Highlighted
Absent Member.
Absent Member.
2183 views

Compile Visual Cobol for .EXE

Jump to solution

I am confused about compiling Visual Basic programs. When I create a "NATIVE" Cobol Command Line Application and then use the compile option under the Visual Studio Menu item "BUILD" it compiles just fine. However it does not create a ".EXE". I also tried with the Command Line and receive the same results.

This test was using everything set with defaults, using the project Skeleton as supplied on the Visual Menu File\New\project

My program can be executed with the "debug" and runs just fine.

I am sure this is a simple fix, but I can find any examples or discussions about it.

I am an experienced Cobol Mainframe programmer (Learned Cobol 68) but never needed to pay attention to the small boxes so I do not have much experience in the scripting languages and changes in Cobol from Mainframe to the smaller platforms.

Any help would be greatly appreciated. This is really frustrating.

------

Source Code (Like I said direct from the Project Create)

identification division.

program-id. Program1.

environment division.

configuration section.

data division.

working-storage section.

procedure division.

display "Hello World".

end program Program1.

I get the Program1                            -Source file

              ConsoleApplication3           -Project File, \

              ConsoleApplication3.dep    - DEP File,

 

C:\Users\donc\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\bin\x86\Debug\Program.idy

C:\Users\donc\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\obj\x86\Debug\Program1   

Plus the Tracking Logs

Output from Compile

* Compiling "c:\users\donc\documents\visual studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\Program1.cbl"

COBOL compile: 1 item(s) succeeded or up-to-date, 0 failed.

* Generating obj\x86\Debug\Program1

* Data: 408 Code: 336 Literals: 140

========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

0 Likes
3 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compile Visual Cobol for .EXE

Jump to solution

What files do you see in C:\Users\donc\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\bin\x86\Debug\ ?

–Ғɑɳօ

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compile Visual Cobol for .EXE

Jump to solution

I overlooked a word you mentioned initially. You use the "compile" option, which only compiles for syntax checking. You need to use the "Build" or "Rebuild" option in order to create the .EXE, which should be found at the same location as the .IDY.

–Ғɑɳօ

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compile Visual Cobol for .EXE

Jump to solution

Now that's a difference I did not even think about. To me compiling did make the executable.

That worked, thank you very much for your help...

View solution in original post

0 Likes
6 Replies
Highlighted
New Member.

RE: Compile Visual Cobol for .EXE

Jump to solution

Have you right clicked your project in the Solution explorer, select the Application tab and looked at the Output type?

It probably has INT/GNT, select the drop down and change it to "Console Application"

Recompile.

Neil

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compile Visual Cobol for .EXE

Jump to solution

What files do you see in C:\Users\donc\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\bin\x86\Debug\ ?

–Ғɑɳօ

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compile Visual Cobol for .EXE

Jump to solution

Thanks for the reply.

It is set to Console Application,

What directory should the default .exe be created in?

See Screen

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compile Visual Cobol for .EXE

Jump to solution

Only 1 file is there  "Program1.idy"

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compile Visual Cobol for .EXE

Jump to solution

I overlooked a word you mentioned initially. You use the "compile" option, which only compiles for syntax checking. You need to use the "Build" or "Rebuild" option in order to create the .EXE, which should be found at the same location as the .IDY.

–Ғɑɳօ

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compile Visual Cobol for .EXE

Jump to solution

Now that's a difference I did not even think about. To me compiling did make the executable.

That worked, thank you very much for your help...

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.