Highlighted
Absent Member.
Absent Member.
519 views

Creating an execution

Jump to solution

On my development PC I was able to create an executable - probably very crudely. We're talking 2017 Visual Studio and a solution with many projects. After looking at video's of the subject and exploring everything I could think of I found a folder under my start up project of bin/Debug that had all of the executables of the solution. Executing the start up project gave complete expected results. I picked up the contents of that folder and moved to a new location in my mind proving that the location was not critical, again good results. My thinking was if I create a matching file structure of my destination PC I could just move the executables (actually that whole folder which contained a lot of files besides executables) and my data files and it should execute on the destination PC. That didn't happen so I probably need some other supporting files. Got any suggestions? My technique for execution may also be faulty and any suggestion there might satisfy my problem. 

I got another question (I'm down to very few). In the windows development, how do your create a beep when the user has abused a process?  

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Creating an execution

Jump to solution
COBOL Server is a Micro Focus product, not a Microsoft one and it is available for sale to customers that have a fully licensed Visual COBOL development product. If you are using the Visual COBOL Personal Edition version, which is a learning tool then the COBOL Server product is not available to you as you are not allowed to deploy your applications to other computers.

For the Beep in a Windows Forms application you can use:
Add this line to the top of your program or check System.Media on the namespaces tab of the Property page.
$set ilusing"System.Media"

Then you can emit the system beep using:
invoke type SystemSounds::Beep::Play

For a GUI app it would seem more likely that you would display a MessageBox to alert the user and you can do this with the MessageBox class.
invoke type MessageBox::Show("This is a Message!")

To create a web application you should select the ASP.NET Web Application project template. There is a very simple tutorial in the docs that demonstrate this and then there are some better examples in the Samples Browser available under the Micro Focus Visual COBOL group on the start menu.

You might also want to get a copy of the book Visual COBOL: A Developers Guide to Modern COBOL.

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Creating an execution

Jump to solution
If you look in the properties page of your project on the COBOL tab you will see a field called Output Path. This is the location that will receive the executable files resulting from the build. The default value for this will differ depending on the type of project template you use, the target CPU type and whether you are using a Debug or Release build configuration. You can change this field to point to and valid folder name on your system. Many users create a common folder on their system into which all executables will be placed.

In order to run an executable on a system on which the Visual COBOL development system is not installed, you will need the COBOL Server product. This product contains all the necessary run-time and licensing components in order to run your application. This can either be installed locally directly on the computer where you will be running or can be installed on a server and shared by multiple workstations. If you install on a server then some additional configuration is required and this is covered in the documentation under the section for Deployment.

How to emit a beep would be dependent on what type of application this is. Is this a native or managed application? Is it a console application or a Winform, WPF, Web based, etc.?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Creating an execution

Jump to solution
My application is a managed windows. I've looked for the COBOL Server Product in Microsoft sites but don't find it (and reading about this only complicates matters). Can you provide a specific download for a single PC?

As for the beep, there must be something you can add to your windows for this purpose?

At some point I want some of my projects to end up in a web site. My search for good materials on the subject has not been successful.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Creating an execution

Jump to solution
COBOL Server is a Micro Focus product, not a Microsoft one and it is available for sale to customers that have a fully licensed Visual COBOL development product. If you are using the Visual COBOL Personal Edition version, which is a learning tool then the COBOL Server product is not available to you as you are not allowed to deploy your applications to other computers.

For the Beep in a Windows Forms application you can use:
Add this line to the top of your program or check System.Media on the namespaces tab of the Property page.
$set ilusing"System.Media"

Then you can emit the system beep using:
invoke type SystemSounds::Beep::Play

For a GUI app it would seem more likely that you would display a MessageBox to alert the user and you can do this with the MessageBox class.
invoke type MessageBox::Show("This is a Message!")

To create a web application you should select the ASP.NET Web Application project template. There is a very simple tutorial in the docs that demonstrate this and then there are some better examples in the Samples Browser available under the Micro Focus Visual COBOL group on the start menu.

You might also want to get a copy of the book Visual COBOL: A Developers Guide to Modern COBOL.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.