Highlighted
Absent Member.
Absent Member.
1883 views

Nothing displayed in console when running program

Hi, I wrote a HelloWorld program :

        identification division.
        program-id. HelloWorld.

        environment division.
        configuration section.

        data division.
        working-storage section.
        01  ANSWER-AREA.
           05  GET-ANS                         PIC X.
           
        procedure division.
        DISPLAY 'HELLO WORLD'.
           DISPLAY 'THIS IS THE FIRST COBOL PROGRAM'.
           DISPLAY 'PRESS ENTER TO END THE PROGRAM'.
           ACCEPT GET-ANS
           STOP RUN.

When I run the program nothing is displayed in console.

I use MS VS Shell 2010, on Win 7.

Where I am wrong ? Thx.

Tags (1)
0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Nothing displayed in console when running program

This sounds like you might have created the project as a Windows application which is GUI instead of a Console application which is character based.

Double-click on the project properties and look at Application tab. If Output Type is set to Windows Application change it to Console Application and try again.

Thanks.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Nothing displayed in console when running program

Try:  DISPLAY 'HELLO WORLD' UPON CONSOLE

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.