Example 14: Manipulate non-standard member names


//JOB0014  JOB ...
//DOINHEX  EXEC PGM=IQIBUTIL,
//         PARM='MEMRULE=3,LIST=YES'
//IN       DD DISP=SHR,DSN=INXY025.TEST.SOURCE
//OUT      DD DISP=SHR,DSN=INXY025.PLAY.SOURCE
//SYSIN    DD *
STEP1 DELETE OUTDD=OUT
      S M=(9*,8*)
STEP2 COPY OUTDD=OUT,INDD=IN
        SELHEX MEMBER=(C1C2C34040404040,F9818283F1F2F3F4,R)
        SELHEX MEMBER=(E7E8E94040404040,F9A7A8A9C1C2C340)
STEP3 RENAME OUTDD=OUT
        S M=((9*,8=======))
        EXCLHEX M=(F9A7A8A9C1C2C340)
/*

This example has these steps:

  • Deletes all member names that begin with "9" or "8", in INTT025.PLAY.SOURCE.
  • Copies members ABC and XYZ from INTT025.TEST.SOURCE into INTT025.PLAY.SOURCE.

    The copied members are respectively renamed in the target library as 9abc1234 and 9xyzABC.

  • Renames all member names that begin with "9" into same names with "8" in the first character, except for member "9xyzABC".

The EXEC PARM "MEMRULE=3" is required to be able to manipulate non-standard member names.

DD statements JOBLIB and STEPLIB are omitted, implying that load module IQIBUTIL is residing in a LINKLIST library.

DD statement IQIBUDFL is omitted, implying that DSC customization member IQIDFLTS is residing in a PARMLIB library.

DD statements SYSPRINT and IQIBUPRT are omitted, resulting in a dynamic allocation of a SYSOUT data set with DD name IQIBUPRT. This data set will contain all the output normally intended for SYSPRINT.