Technical Blog Post
Abstract
How to "TERSE" a PDSE library.
Body
If it is necessary to terse a PDSE library, use AMATERSE (if using the older TRSMAIN, this simply uses AMATERSE "under the covers"). For example, it may be necessary to terse a Connect:Direct LINKLIB and send it in to Connect Support. Unfortunately, AMATERSE does not fully support PDSE libraries; when an attempt is made to unterse the tersed PDSE file, it fails with error "AMA504I RETURN CODE: 40".
To terse and unterse a PDSE, you need to first do a TSO XMIT, then terse the resulting file.
Use following the JCL example to perform a batch TSO XMIT and then a PACK of the PDSE file using AMATERSE:
//PDSESEND JOB (CDLEV1),'TSO SEND',NOTIFY=&SYSUID,
// REGION=1024K,MSGCLASS=X,CLASS=A
//*
//* XMIT PDSE LINKLIB
//*
//SETUP EXEC PGM=IEFBR14
//FILE DD DISP=(MOD,DELETE),DSN=YOUR.HLQ.LINKLIB.XMIT,
// UNIT=SYSDA,SPACE=(TRK,1)
//*
//XMIT EXEC PGM=IKJEFT01,REGION=4M,COND=(0,NE)
//FILEIN DD DISP=SHR,DSN=YOUR.HLQ.LINKLIB
//FILEOUT DD DISP=(,CATLG),DSN=YOUR.HLQ.LINKLIB.XMIT,
// UNIT=SYSDA,SPACE=(TRK,(100,100),RLSE)
//SYSTSIN DD *
XMIT A.B FILE(FILEIN) OUTFILE(FILEOUT) -
SYSOUT(Z) NOEPILOG NOLOG NOPROLOG
//SYSTSPRT DD SYSOUT=*
//*
//* PACK PDSE LINKLIB
//*
//AMATERSE EXEC PGM=AMATERSE,PARM=PACK,REGION=5000K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=YOUR.HLQ.LINKLIB.XMIT
//SYSUT2 DD DSN=YOUR.HLQ.LINKLIB.XMIT.TRS,
// VOL=(,,,1,SER=(USER18)),
// DISP=(NEW,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(25,10),RLSE)
The resulting file, YOUR.HLQ.LINKLIB.XMIT.TRS, can then be sent as binary to Connect Support or used however you need for a tersed file.
To unterse the tersed file so that it can be used once again as a PDSE library, you will need to first pre-allocate the ‘YOUR.HLQ.LINKLIB.PDSE’ PDSE library, then run an unterse (UNPACK) on the tersed file followed by a TSO RECEIVE.
The following sample JCL can be used for this:
NOTE: If the dataset ‘YOUR.HLQ.LINKLIB.XMIT’ already exists (for example, from the previous JCL), use //SYSUT2 DD DISP=SHR,DSN=YOUR.HLQ.LINKLIB.XMIT for the SYSUT2.
//PDSERECV JOB (CDLEV2),'RECEIVE',NOTIFY=&SYSUID,
// REGION=1024K,MSGCLASS=X,CLASS=A
//*
//* UNPACK PDSE LINKLIB
//*
//AMATERSE EXEC PGM=AMATERSE,PARM=UNPACK,REGION=5000K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=YOUR.HLQ.LINKLIB.XMIT.TRS
//SYSUT2 DD DSN=YOUR.HLQ.LINKLIB.XMIT,
// VOL=(,,,1,SER=(USER18)),
// DISP=(NEW,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(25,10),RLSE)
//*
//* RECEIVE PDSE LINKLIB
//*
//RECVPDS EXEC PGM=IKJEFT01,COND=(0,NE)
//INPUT DD DISP=(OLD,CATLG),DSN=YOUR.HLQ.LINKLIB.XMIT
//SYSTSIN DD *
RECEIVE INFILE(INPUT) NONAMES
DSNAME('YOUR.HLQ.LINKLIB.PDSE') RELEASE
//SYSTSPRT DD SYSOUT=*
//*
UID
ibm11124193