On Wed, 10 Dec 2008 12:53:13 +0200, גדי בן
אבי <[EMAIL PROTECTED]>
wrote:
>One of our users is writing a program that reads a variable record length
RRDS file.
>
>He asked me if there is a way determine the actual record length of a
particular record.
>
Enterprise COBOL for z/OS Language Reference
Version 4 Release 1
Document Number SC23-8528-00
Paragraph 5.2.5.3
Format 3 is used to specify variable-length records.
┌─── Format 3
─────────────&#9472;───────────────────&#9472;──────
─────────────&#9472;───────────────────&#9472;──────
─────┐
│
│
│
>>──RECORD──┬────┬──VARYING──┬────┬──┬──&#9472;───┬─
─┬───────────&#9472;─────────┬──┬──────&#9472;──────
──┬──────> │
│ └─IS─┘
└─IN─┘ └─SIZE─┘
└─┬──────┬──integer-6─┘
└─TO──integer-7─┘ │
│
└─FROM─┘ │
│
│
│
>──┬──────────&#9472;─┬──┬──────────────&#9472;──────
───────────┬─&#9472;───────────────────&#9472;──────
─────────────><
│
│ └─CHARACTERS─┘
&#9492;─DEPENDING──┬────┬──data-name-
1─┘ │
│
└─ON─┘
│
│
│
└────────────&#9472;───────────────────&#9472;──────
─────────────&#9472;───────────────────&#9472;──────
─────────────&#9472;─────┘
integer-6 Specifies the minimum number of bytes to be contained in any record
of the file. If integer-6 is not specified, the minimum
number of bytes to be contained in any record of the file is equal to
the least number of bytes described for a record in that file.
integer-7 Specifies the maximum number of bytes in any record of the file. If
integer-7 is not specified, the maximum number of bytes
to be contained in any record of the file is equal to the greatest
number of bytes described for a record in that file.
The number of bytes associated with a record description is determined by the
sum of the number of bytes in all elementary data items
(excluding redefinitions and renamings), plus any implicit FILLER due to
synchronization. If a table is specified:
The minimum number of table elements described in the record is used in
the summation above to determine the minimum number of
bytes associated with the record description.
The maximum number of table elements described in the record is used in
the summation above to determine the maximum number
of bytes associated with the record description.
If data-name-1 is specified:
data-name-1 must be an elementary unsigned integer.
data-name-1 cannot be a windowed date field.
The number of bytes in the record must be placed into the data item
referenced by data-name-1 before any RELEASE, REWRITE, or
WRITE statement is executed for the file.
The execution of a DELETE, RELEASE, REWRITE, START, or WRITE
statement or the unsuccessful execution of a READ or RETURN
statement does not alter the content of the data item referenced by data-
name-1.
After the successful execution of a READ or RETURN statement for the file,
the contents of the data item referenced by
data-name-1 indicate the number of bytes in the record just read.
Cheers,
Jantje.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html