I ran this job --
//JOBLIB DD DISP=(SHR,PASS),DSN=&SYSUID..LOAD
// DD DISP=(SHR,PASS),DSN=&SYSUID..OLOAD
//A EXEC PGM=IEFBR14
//PDSGAS DD DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
// DSN=&SYSUID..TESTPDS.PDSGAS
//SYSTSPRT DD DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
// DSN=&SYSUID..TESTPDS.SYSTSPRT
//B EXEC PGM=PDSGAS
//SYSPRINT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSUT1 DD DISP=SHR,DSN=&SYSUID..ASM
//C EXEC PGM=IKJEFT01
//SYSTSPRT DD DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSTSIN DD *
LISTD ASM LABEL
//D EXEC PGM=CNVTM
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=(OLD,DELETE),DSN=*.B.SYSPRINT
//SYSUT2 DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(1,1)),
// DSN=*.A.PDSGAS
//E EXEC PGM=CNVTM
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=(OLD,DELETE),DSN=*.C.SYSTSPRT
//SYSUT2 DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(1,1)),
// DSN=*.A.SYSTSPRT
PDSGAS is a program that analyzes a PDS to "undelete" members, though this run just produces the report. CNVTM is a program to preoare a dataset using carriage control for a PC based word processor, though I usually display the data using Windoze NOTEPAD.
Part of the output from PDSGAS is --
FLAT2PDS 001801 001801 001902 079E000901 079E000A02
*****GAS 001903 001A02 079E000A03 079E000B02
PDS2FLAT 001A03 001A03 001B02 079E000B03 079E000C02
*****GAS 001C01 001C03 079E000D01 079E000D03
RETCODE 001C04 001C04 001C05 079E000D04 079E000D05
*****GAS 001D01 001D03 079E000E01 079E000E03
INVOKE 001E01 001E01 001E03 0634000001 0634000003
"Member" entries marked as GAS represent the space occupied by deleted members. The last member is INVOKE, it starts at TTR 001E01 and ends at TTR 001E03. 0634000001 0634000003 are the disk addresses of the first and last records.
The output from the TSO step is -
LISTD ASM LABEL
XXXXXX.ASM
--RECFM-LRECL-BLKSIZE-DSORG
FB 80 27920 PO
--VOLUMES--
XXXXXX
--FORMAT 1 DSCB--
F1 C6E4E2D9F1C5 0001 6E00E5 000000 02 00 00 C9C2D4D6E2E5E2F24040404040
6F0076A0000000 0200 90 00 6D10 0050 00 0000 82 C0000001 001E03 4532 0000
8100079D0000079E000E 8101063400000634000E 00000000000000000000 0000000000
The LABEL option tells the LISTDS command to display the contents of the DSCBs for the dataset, in hexadecimal. The C0000001 are codes to indicate the secondary allocation is 1 cylinder. 001E03 4532 The first 6 digits show the TTR of the last record in the dataset. The 4532 is the remaining space on the track, this translates to 17714, but not all of that space can actually be used for data. 8100079D0000079E000E 8101063400000634000E are the extent entries for the dataset. A skilled analyst can quickly deduce the first extent has 2 cylinders, and the second extent has 1 cylinder.
Now, what would happen if I tried the ISPF FREE function for this dataset? Actually, nothing, since part of the second extent contains data.
If I add another member, the system will attempt to use the remainder of the last used track, and then continue using the remaining tracks in the extent.