Free-format COBOL source files
IBM® COBOL for Linux® on x86 suppresses some messages that are related to enforcing fixed-format source code.
When you use IBM COBOL for Linux on x86 to compile source code that contains free-format COBOL source, you will receive the error messages in the following example:
$ cat tcFreeFormat.cbl
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. FreeFormat.
000300 ENVIRONMENT DIVISION.
000400 DATA DIVISION.
000500
000600 PROCEDURE DIVISION.
000700 BEGIN-MY-PROGRAM.
000800 DISPLAY "COBOL for Linux on x86 1.2.0...".
000900 STOP RUN.
$ cob2 tcFreeFormat.cbl
IBM COBOL for Linux 1.2.0 compile started
0LineID Message code Message text
8 IGYPS0009-E "DISPLAY" should not begin in area "A". It was processed as if found
in area "B".
9 IGYPS0009-E "STOP" should not begin in area "A". It was processed as if found in
area "B".
-Messages Total Informational Warning Error Severe Terminating
0Printed: 2 2
End of compilation 1, program FREEFORMAT, highest severity: Error.
Return code 8
You can rewrite your source in fixed format, or use
scu
to convert your source
from free-format source to fixed-format source:$ cat sol-tcFreeFormat.cbl
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. FreeFormat.
000300 ENVIRONMENT DIVISION.
000400 DATA DIVISION.
000500
000600 PROCEDURE DIVISION.
000700 BEGIN-MY-PROGRAM.
000800 DISPLAY "COBOL for Linux on x86 1.2.0...".
000900 STOP RUN.