End-of-file marker
OS/MVS simulation
uses the end-of-file (EOF) marker (X'61FFFF61') to identify
the end of the OS data in a file when all of the following conditions
are met:
- File mode number is 4
- OS record format is FB or FBS
- Last block of the file is a short block
- File is being processed under the QSAM, BSAM, or BPAM access method.
Because CMS file system will not allow you to write records of varying length to a fixed format CMS file, the EOF marker marks the end of a file.
There are a few other places where the EOF marker is used:
- Any time the MOVEFILE command is being used to read a file.
- Any time a partitioned data set (PDS) is being read by OS/MVS simulation. A file is considered to be a PDS when the DCB data set organization is specified as partitioned (DSORG=PO), when the MEMBER option of the FILEDEF command is specified for the file, or when the PDS option has been specified on the MOVEFILE command that is reading the file.
Note: When writing an FB or FBS format file, under BSAM or BPAM, you
may specify a BLKSIZE value that is less than the file you are referencing.
This is done to indicate that the last block is a short block, causing
OS/MVS simulation to place an end-of-file marker (described in End-of-file marker) after the last logical record in the output
block.
One last example, let's see what a VB format file would look like.
In the FILEDEF command:
FILEDEF OUTFILE DISK OSFORM VFILE A4
(LRECL 70 BLKSIZE 74 RECFM VB the OSFORM VFILE
will have variable blocked records (RECFM VB). The maximum length
of a record will be 66 bytes plus 4 bytes for a record descriptor
word (LRECL 70). Each block must be large enough to hold the longest
record (LRECL 70) plus a 4-byte block descriptor word (BLKSIZE 74).
Now if your application writes 5 records of lengths 20, 8, 15, 37,
and 15 bytes (respectively) to a file, closes it, and you were to
XEDIT the file, you would see the following: OSFORM FILE A4 F 64 Trunc=64 Size=2
Line=1 Col=1 Alt=10
===== * * * Top of File * * *
===== Record 1 01234567890 Record 2
Record 3 012345
===== Record 4 0123456789012345678901234567
Record 5 012345
===== * * * End of File * * *
The first four nondisplayable characters on each line are block descriptor words. The four nondisplayable characters in front of each record are the record descriptor words for those records. Note that the CMS record length for the file is shown as 64; this is the length of the longest block in the file.