Unpackaging a dataset using the IBM Utility TRSMAIN.

Document ID : KB000053467
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Example JCL to unpack a TRSMAIN packed dataset.

Solution:

//yourjobcard
//*  The following step deletes the OUTFILE dataset
//*  before unpacking,  This step will get a return code 8
//*  if the dataset does not exist
//IDCAMS  EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
 DELETE x.x.DATA
/*
//*  The following step allocates the OUTFILE dataset
//*  before unpacking,
//ALLOC1 EXEC PGM=IEFBR14
//OUTFILE DD DSN=x.x.DATA,UNIT=SYSDA,
//       SPACE=(CYL,(100,200),RLSE),DISP=(,CATLG,DELETE)
//TRSMAIN EXEC PGM=TRSMAIN,PARM='UNPACK',TIME=20
//*  A steplib may be needed in order to find the TRSMAIN program
//*  STEPLIB  DD  DSN=x.x.dataset,DISP=SHR
//SYSPRINT DD  SYSOUT=*,DCB=(LRECL=133,BLKSIZE=12901,RECFM=FBA)
//INFILE DD DSN=x.x.TERSE,DISP=SHR
//OUTFILE DD DSN=x.x.DATA,DISP=OLD
//SYSIN DD DUMMY
//