Extra and misplaced periods in COBOL source
You must remove extra or misplaced periods in the fixed-format source.
When you use IBM® COBOL for Linux® on x86 to compile source code that contains extra and misplaced periods, you will receive the error messages in the following example:
$ cat tcPeriods.cbl
000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. TEST-CASE.
000030 ENVIRONMENT DIVISION.
000040 DATA DIVISION.
000050
000060 PROCEDURE DIVISION.
000070 PERFORM GREETING.
000080 .
000090
000100 STOP RUN.
000110
000120 GREETING.
000130 .
000140
000150 DISPLAY "HELLO FROM IBM.".
$ cob2 -o tcPeriods tcPeriods.cbl
IBM COBOL for Linux 1.2.0 compile started
0LineID Message code Message text
8 IGYPS0019-W No COBOL statement was found between periods.
Same message on line: 13
-Messages Total Informational Warning Error Severe Terminating
0Printed: 2 2
End of compilation 1, program TEST-CASE, highest severity: Warning.
Return code 4
According to Standard COBOL 2002, fixed-format source cannot include extra or missing periods in the source.
Change your COBOL source to follow Standard COBOL 2002, or use
scu
to remove
extra and misplaced periods:$ cat sol-tcPeriods.cbl
000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. TEST-CASE.
000030 ENVIRONMENT DIVISION.
000040 DATA DIVISION.
000050
000060 PROCEDURE DIVISION.
000070 PERFORM GREETING.
000080
000090
000100 STOP RUN.
000110
000120 GREETING.
000130
000140
000150 DISPLAY "HELLO FROM IBM.".