Cobos Tutorial : How to check the syntax of a COBOL program with Cobos
If you recently joined reading our Cobos tutorial serie, don’t forget to read our previous posts, which will help you handling the tool:
- How to Install Cobos in eclipse
- COBOL program edition
- Code syntax checking
- Program unfolding
- 3270 emulation
- Mainframe connection through FTP access
- Local or remote compilation of a source file, directly on the Mainframe
Note: When downloading Cobos, the package comes with a sample file named “Custload.cob”. We’ll use this file to demonstrate how Cobos checks syntax.
- Open the file “Custload.cob”, then select menu “Cobos ► Check syntax”
or click on the “check syntax” button placed in the toolbar or use the keyboard shortcut “Ctrl + Shift + V”.
- Once the check syntax has been achieved, 4 warnings are found in this program.
- In the Problems view, expand the Warnings line to see the messages.
- Simply double-clicking a message in the Problems view gives focus on the line in error in the COBOL editor.
Checking copybooks syntax
In general, COBOL programs contain copybooks. Let’s see how it works in Cobos.
- Open the program “cf00p.cob” from mxwuser.jeu230.cobol project with the COBOL Editor.
- Check syntax (select menu “Cobos ► Check syntax” or click on or hit “Ctrl + Shift + V”).
- Once the check syntax has been achieved, 6 warnings are found in this program.
- Double click on the warning of the copybook “commarea.cob”. This copybook shows off in the COBOL Editor.