On 31/10/2024 7:48 am, jacampbellaus via groups.io wrote:
Should have added - a PDS directory block is a keyed block.
Yes, to calculate the number of directory blocks that will fit on a track, you need to account for 256-byte data blocks each with an 8-byte key.
Also, to calculate the space required by a PDS (as compared to a sequential data set) you need to account for an EOF marker at the end of the PDS directory and an EOF marker at the end of every member.? Most of the time, meaning for most DASD types, when aiming for the PDS directory to occupy an integral number of tracks, the trick is to multiply the desired number of tracks by the number of PDS blocks per track (for that device type), and then subtract one to leave room for the EOF marker.
A sequential data set does not end with an EOF marker - although it could be read successfully if it did.
The VTOC entry of PS (and PO) data sets contains the TTR of the last record written.? With DISP=MOD (or OPEN EXTEND (or OUTINX) with DISP=OLD or DISP=SHR), the first block appended will be the block after the previous "last block written".? The track balance field in the VTOC informs the access method as to what size is the largest bock that will fit on the track with the previous last block. Accordingly, the first newly appended block will either fit on the previous last track or will be the first block on the next (relative) track.
DISP=MOD and OPEN EXTEND are not allowed for PDSes (or even for PDSEs).
IBM's ISPF option 3.2 always did an OPEN/CLOSE cycle on a newly allocated sequential data set.? We used to say that it wrote an EOF marker, but probably what it really ended up doing was erasing all blocks on the first track.? Compare this to a PGM=IEFBR14 (or any other program) step that creates a new sequential data set with JCL.? Make the block size big enough and you can read any residual data that previously occupied those tracks (assuming no RACF erase-on-scratch facility or similar).
Later on, SMS-managed sequential data sets allocated by JCL also got the EOF marker or first track erased thing done.
RFE option 3.2 does not do an open/close cycle when allocating new sequential data sets.
Rob can tell us what happens with the equivalent case when using RPF.
Cheers,
Greg