Before performing a build of a COBOL project with an executable file as the target type, specify one of the source files of the project as the main program. If the main program is not specified, a link error will occur. The two types of main programs, determined according to types of programs created, are described below. The main program type is specified with a wizard when a COBOL project is created.
Application that uses the COBOL console
Specifies that a console window created by a COBOL program is the input-output destination of ACCEPT and DISPLAY statements, and that a message box is the output destination of execution-time error messages.
Application that uses the system console
Specifies that the system console (command prompt window) is the input-output destination of ACCEPT and DISPLAY statements and execution-time error messages.
Point
If the COBOL console window is specified as the main program, and the application is executed from NetCOBOL Studio, the Console view is used instead of the system console.
Specifying the main program
To specify the main program:
Select a source file in the "Dependency" or "Structure" view.
Select "Main Program" from the context menu.
The selected COBOL source file is set as the main program, and the icon of the file is changed.
Changing the main program type
To change the main program type:
Select the appropriate project from the "Dependency" or "Structure" view.
Select "File" > "Properties" from the menu bar, or select "Property" from the context menu. The Properties dialog box appears.
Select "Target" in the left pane. The "Target" page is displayed.
Select "COBOL console window" or "System console window" from "Application format", and click "OK" button.