Page 2 of 2

Re: RECFM=U|V

PostPosted: Mon Nov 19, 2018 2:07 am
by steve-myers
trengri wrote:Thank you!
Actually, this is what I wanted to figure out - how the data is layed out on the disk with different access methods.
How do you obtain these CKD dumps? Did you write your own channel program and use EXCP?

Yes, the program uses EXCP.

Re: RECFM=U|V

PostPosted: Mon Nov 19, 2018 3:46 pm
by willy jensen
Use the AMASPZAP utility to print the dataset:
//PRINT   EXEC PGM=AMASPZAP                
//SYSPRINT DD SYSOUT=*,OUTLIM=5000        
//SYSLIB   DD DISP=SHR,DSN=dataset.name  
 ABSDUMPT ALL  

Re: RECFM=U|V

PostPosted: Mon Nov 19, 2018 7:03 pm
by steve-myers
Many places hide IMASPZAP from the grunts: stupid auditors think it is "dangerous."

Something like this works everywhere.
//PRINT   EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*,OUTLIM=5000
//INDS     DD  DISP=SHR,DSN=your-data-set,
//             DCB=(RECFM=U,BLKSIZE=32760)
//SYSIN    DD  *
 PRINT INFILE(INDS) DUMP

Re: RECFM=U|V

PostPosted: Mon Nov 19, 2018 7:09 pm
by willy jensen
Yeah, AMASPZAP is not popular with the auditors.
Another method is using the ADRDSSU PRINT:
//DSS     EXEC PGM=ADRDSSU                        
//DISK     DD DISP=SHR,DSN=dataset.name  
//SYSPRINT DD SYSOUT=*                            
  PRINT  DS(dataset.name) INDD(DISK) /* ALLDATA */

Re: RECFM=U|V

PostPosted: Tue Nov 20, 2018 8:49 am
by steve-myers
trengri wrote:... But why would anyone want to store the record length in the first few bytes, if the record length could be determined without it (interblock gaps are always there)?
So it's unclear to me why both of these formats exist, one of them is redundant to my mind.

The Block Descriptor Word (the first 4 bytes in a Physical Record) can effectively serve two purposes.
  • Obviously, it provides a means of removing logical records from the physical record.
  • By cross checking the record length in the BDW with the record length determined by using the traditional method used to obtain the record size, the analyst can quickly determine if the entire record was read.
The designers of the System/360 hardware and programming systems were fully aware of the funny codes used in the 14xx series of computers that preceded System/360. I think they regarded these codes - which were baked into the hardware - as a debacle which caused real trouble in dealing with binary data. They wanted to avoid these issues, so there are no "word marks," "tape marks" and similar foolishness in System/360. It also means data blocking in physical records is by implicit record length (RECFM FB) or by binary encoded record lengths (RDWs) in RECFM V.

Re: RECFM=U|V

PostPosted: Tue Nov 20, 2018 3:14 pm
by willy jensen
The BDWs and RDWs are 4 bytes, even though 2 bytes would be enough to hold the maximum block- and record lengths of 32K. The block- and record lengths are kept in the first 2 bytes, the 2nd halfword of the RDW is the segment number for spanned record - which is another can of worms.
I suggest that you looks at these links:
https://www.ibm.com/support/knowledgece ... ts_159.htm
https://www.ibm.com/support/knowledgece ... /d4357.htm
https://www.ibm.com/support/knowledgece ... /d4356.htm

Re: RECFM=U|V

PostPosted: Tue Nov 20, 2018 8:15 pm
by steve-myers
willy jensen wrote:The BDWs and RDWs are 4 bytes, even though 2 bytes would be enough to hold the maximum block- and record lengths of 32K. The block- and record lengths are kept in the first 2 bytes, the 2nd halfword of the RDW is the segment number for spanned record - which is another can of worms.
I suggest that you looks at these links:
https://www.ibm.com/support/knowledgece ... ts_159.htm
https://www.ibm.com/support/knowledgece ... /d4357.htm
https://www.ibm.com/support/knowledgece ... /d4356.htm

I have always thought 4 bytes for the BDW and RDW was excessive, but ...

The second halfword of a spanned RDW just has flags, not a number. The flags indicate first segment, middle segment, and last segment.

Spanned variable length data was added in OS/360 Release 18 ( I think I have that right) around 1968. It was accompanied with two hardware improvements
  • The first RPS (Rotational Position Sensing) disk device, control unit and Block Multiplexing channel. I can rant on about that, but it is unrelated to the topic.
  • The first tape device with single bit error correction.
RPS was only important with the 360/85, a machine I thought would never apply to me. As a direct statement this was true as never in my life did I see or use a /85, but the /85 morphed into the 370/165, and /168 , machines I used through the 1970s. The 1968 RPS was for a single device which seemed far too esoteric to me. Of course I had no idea that the 3330 and other large capacity (OK 100 megabyte disk devices were BIG in 1968) and I'd be using them in the 1970s

Re: RECFM=U|V

PostPosted: Tue Nov 20, 2018 8:53 pm
by willy jensen
The second halfword of a spanned RDW just has flags, not a number.

steve-myers, you are quite right, been a while since I did spanned records - but it still has to do with spanned records ;)