IBM OS/390 User Manual

Page of 673
ASSIGN Clause
The format of the 
ASSIGN
 clause has become simpler. COBOL for OS/390 and VM
may sometimes allow the DOS/VS COBOL format but may produce unexpected
results at run-time. Refer to the 
COBOL for OS/390 and VM Compiler and
Run-Time Migration Guide for more information.
12.4.3 DATA DIVISION - FILE DESCRIPTION (FD)
BLOCK CONTAINS
In OS/390 it is recommended that you specify 
BLOCK CONTAINS 0 RECORDS
 or 
BLOCK
CONTAINS 0 CHARACTERS
in your program. For an output file, you specify the
required information on the 
DD
 statement. If you omit the blocking information for
an output file OS/390 will supply a System Determined Blocksize (SDB). For an
input file, the information is obtained from information in the catalog and VTOC.
If you specify 
BLOCK CONTAINS n RECORDS
 and also supply the information on the
DD statement, for an output file, the
BLOCK CONTAINS n RECORDS
 takes precedence
over the DD statement information.
If you specify 
BLOCK CONTAINS n RECORDS
 for an input file, and the VTOC
information does not match, your program may ABEND or return a file status
code of 39.
LABEL RECORDS
DOS/VS COBOL accepts the 
LABEL RECORD IS
data-name for non-sequential files.
COBOL for OS/390 and VM does not, therefore you must change your program to
remove
LABEL RECORD IS
data-name for these files.
LINAGE Clause and END-OF-PAGE Phrase
Under DOS/VS COBOL the 
END-OF-PAGE
 phrase may be specified without a
corresponding 
LINAGE
 clause in the file description entry.
Under COBOL for OS/390 and VM if the 
END-OF-PAGE
 phrase is specified then the
FD entry for the file must contain a 
LINAGE
 clause. Even then, you may find that
your printed page layout is not as you expect. You should use your own line
count logic in your program, making use of the 
LINAGE-COUNTER
 special register.
12.4.4 PROCEDURE DIVISION - Input/Output
CLOSE Statement for Tapes
Under DOS/VS COBOL the 
CLOSE
file-name
WITH LOCK
 statement closed and
locked the file, and UNLOADed the tape reel or cartridge. Under COBOL for
OS/390 and VM the file is closed and locked, but only rewound, not onloaded.
Similarly, for multi-volume tape files, DOS/VS COBOL rewinds and unloads each
volume at end-of-volume. COBOL for OS/390 and VM only rewinds the tape, it
does not unload it.
Note that this behavior may be different if you use a tape management system.
256
VSE to OS/390 Migration Workbook