Examples

Suppose you have a partitioned data set whose members contain a pre-built load module (LMODABC) and two aliases (ALIAS1 and ALIAS2). Further, suppose that you want to package LMODABC and its aliases inline in a PTF. The steps to package and install pre-built load module LMODABC in a PTF are as follows:

Step 1: Unload the partitioned data set member LMODABC and its aliases to create a sequential, VS format, data set.
//JOBx     JOB …
//STEP1    EXEC PGM=IEBCOPY,REGION=512K
//SYSPRINT DD  SYSOUT=*
//SYSUT3   DD  UNIT=SYSDA,SPACE=(TRK,(5,1))
//SYSUT4   DD  UNIT=SYSDA,SPACE=(TRK,(5,1))
//INPUT    DD  DSN=userid.TEST.LOAD,DISP=SHR
//OUTPUT   DD  DSN=userid.UNLOAD.DATA,DISP=(NEW,CATLG),
//             SPACE=(CYL,(20,10),RLSE),UNIT=SYSDA
//SYSIN    DD  *
  COPY    OUTDD=OUTPUT,INDD=INPUT
  SELECT  MEMBER=LMODABC
  SELECT  MEMBER=ALIAS1
  SELECT  MEMBER=ALIAS2
/*
Step 2: Transform the unloaded data set into fixed-block-80 type records by using the SMP/E provided service routine GIMDTS.
//JOBx     JOB …
//TFORM    EXEC PGM=GIMDTS
//* -----  GIMDTS IS AN SMP/E LOAD MODULE.
//SYSPRINT  DD SYSOUT=*
//*
//* ----- INPUT TO BE TRANSFORMED - RECFM=VS
//*
//SYSUT1    DD DSN=userid.UNLOAD.DATA,DISP=SHR
//*
//* ----- OUTPUT - RECFM=FB
//*
//SYSUT2    DD DSN=userid.FB80.DATA,DISP=OLD
Step 3: Place the fixed block 80 records inline in the PTF following the ++PROGRAM MCS that identifies the element and its aliases to SMP/E.
++PTF(PTF0001).
++VER(Z038) FMID(DC00001).
++PROGRAM(LMODABC) ALIAS(ALIAS1,ALIAS2) DISTLIB(TGTLIB)
     SYSLIB(VEND001).
  ⋮
  Place the data transformed by GIMDTS here.
  ⋮
Step 4: APPLY the PTF to install LMODABC and its aliases into the appropriate target library.
SET BDY(TGT1).
APPLY PTF(PTF0001).

During the APPLY step, SMP/E retransforms the inline data back into a variable spanned (VS) sequential data set. SMP/E then invokes the copy utility to copy the retransformed data into the target library. The program element and aliases are copied using a COPYMOD and SELECT statements.

After the APPLY, the target library contains LMODABC and its aliases.