For example:
01 RECORD-A PIC X(4).
01 FILLER REDEFINES RECORD-A.
10 RECA-FIRST PIC 9(2).
10 RECA-SECND PIC 9(2).
Using COBOL for OS/390 and VM you will receive the message:
IGYDS1064-E A REDEFINESclause was found in the definition of a
level-01 item in the FILE SECTION″. The clause was discarded.
This coding practice is documented as invalid in DOS/VS COBOL, but
DOS/VS COBOL did not flag the error.
With DOS/VS COBOL you can specify the SELECT OPTIONAL clause, for an input
file that is to be accessed sequentially, and that may not be present each
time the program is executed. However, if you do specify OPTIONAL, it is
treated as a comment, since for DOS/VS COBOL this function is performed
by the ASSGN job control statement with the IGN parameter.
In COBOL for OS/390 and VM SELECT OPTIONAL is required for a file that may
not be present each time the program is executed, and which is opened in
input, I/O or extend mode.
Therefore, if you have made use of the OPTIONAL key word only as a
comment, you should remove it, as your program may produce unpredictable
results.
DOS/VS COBOL will accept the ACCEPT
identifier
FROM SYSIPT statement
without the keyword FROM. COBOL for OS/390 and VM does not. It will
generate the message:
IGYPS2072-S SYSIPTwas invalid. Skipped to the next verb, period or
procedure-name definition.
The program name supplied in the PROGRAM-ID paragraph is a user-defined
word that identifies the program. If this name contains a COBOL for
OS/390 and VM will converted it to 0. This was true of DOS/VS COBOL also,
but COBOL for OS/390 and VM generates a warning message, IGYDS0020-W,
for example,
IGYDS0020-W Name C2NAC-30was processed as C2NAC030″.
On returning to a COBOL calling program from an Assembler or other
language subroutine, data is left in register 15. In DOS/VS COBOL it did not
matter what this data was. In COBOL for OS/390 and VM the value in register
15 is passed to the RETURN-CODE special register. At the end of the program
the value in the RETURN-CODE special register is returned to OS/390 as a user
return code. If there was invalid data in register 15 on the return to the
calling program, (and therefore also in the RETURN-CODE special register), the
application may produce an unexpected return code from OS/390, or even a
dump.
This problem may be circumvented by adding the following statement to your
converted source code:
MOVE 0 TO RETURN-CODE
You cannot make this change in advance of your conversion as the
RETURN-CODE special register does not exist in DOS/VS COBOL.
254 VSE to OS/390 Migration Workbook