trengri wrote:Robert Sample wrote:You have a MAJOR misunderstanding -- a program knows the record length after reading the record by looking at the RDW and ONLY by looking at the RDW. Otherwise, since data sets are almost always blocked, how does the program know 370 bytes of the 27,998 byte block represent the first record? The RDW is the ONLY way for the program to know this.
Thank you for pointing this out. Surely I have misunderstanding, I am just trying to grasp the concepts, I haven't written a single line of code for mainframes yet.
If the records are blocked (RECFM=VB), then RDW is necessary, no questions.
But I was asking about RECFM=V, which is not blocked, so the program should be able to determine the length without RDW, the same way like RECFM=U does (I assume that it uses interblock intervals for that).
Sorry. RECFM=V has 1 BDW and 1 RDW in each physical record. When I discovered this unexpected fact back in the 1960s (or was it the early 1970s?) I have to admit I was confused. Looking back on it I guess the intent was to make RECFM V readers consistent.
By the way, inter block intervals have nothing to do with length determination. On disk, block length is an attribute of the block. Only on magnetic tape do the inter block gaps affect reading, and, by implication data length determination.
As I said, on disk, block length is, in effect, an attribute of the block. The BDW is still there, but the block length definition specified by the disk hardware rules. Assembler programmers using EXCP can dig out the hardware length definition for a block, but there are few Assembler programmers that actually know EXCP
and know how to dig out the record length.
** COUNT 00A2000001006D5E **
0000 0 6D5E0000 01560000 1E0E007E 57C80118 *_;.........=.H..*
The count area has the record length (6D5E) as well as other data. Technically, the count area is defined by the hardware, but the program creating the record also creates the associated count area. For most programs this is done under the covers as it were.
Jumping to the record itself we see the BDW (6D5E0000) immediately followed by the first RDW (01560000) in the physical record. The 0000 0 to the left of the data area are the hexadecimal and decimal offset of the data in the line; they are there for the convenience of the analyst examining the data.
As Mr. Sample says, most programs reading RECFM V data only see the BDW and the data that follows the BDW. In fact, there are obscure DCB definitions that can be used so the user program does not even see the BDW! But that's best left for another topic.