Return to the Sample Job Stream List

PCSSM21Z Sample Job Stream

Original JCL (VSE)

* $$ JOB  JNM=PCSSM21Z,CLASS=A,SYSID=2,DISP=D
* $$ LST  LST=SYSLST,DISP=L,CLASS=J,FNO=JCL
// JOB    PCSSM21Z
/INCLUDE OP
SET NEXT NOPAUSE IF $PAUSECARD EQ N
// PAUSE
SET STEP NOPAUSE
ON $ABEND OR $CANCEL GOTO ABEND
/*
* ********************************************************************
*  PCSSM21Z LOYALTY PROGRAM FOR GAZELLE CARD                         *
* ********************************************************************
/*
/. S0020
* ********************************************************************
*  PCSSM21Z S0020 M4VBR COPY MIGHTY TO MIGHTY2                       *
*                       COPY MIGHTY TO MIGHTY3 WITH NODATA           *
* ********************************************************************
// EXEC PROC=DATABACK
// EXEC M4VBR,SIZE=AUTO
   COPY REPLACE PURGE
        CATDD=DOSCAT
             SELECT  PCSS.MIGHTY.Q255137.MVC
             NEWNAME PCSS.MIGHTY2.**
   CHECK COND=0 ACTION=CONTINUE ELSE ACTION=CANCEL
 
   COPY REPLACE PURGE NODATA
        CATDD=DOSCAT
             SELECT  PCSS.MIGHTY.Q255137.MVC
             NEWNAME PCSS.MIGHTY3.**
   CHECK COND=0 ACTION=CONTINUE ELSE ACTION=CANCEL
 
/*
/*
/. S0040
* ********************************************************************
*  PCSSM21Z S0040 YP5132 - EXTRACT TXNS FROM XXOLS AND XXAHF         *
* ********************************************************************
/* INPUT FILES
// DLBL  XXOLS,  'PCSS.XXOLS',,VSAM,CAT=DOSCAT
// DLBL  XXAHF,  'PCSS.XXAHF',,VSAM,CAT=DOSCAT
// DLBL  MIGHTYO,'PCSS.MIGHTY2.Q255137.MVC',,VSAM,CAT=DOSCAT
/*
/* OUTPUT FILE
// DLBL  MIGHTYN,'PCSS.MIGHTY3.Q255137.MVC',,VSAM,CAT=DOSCAT
/* DLBL EZTVFM,'%P.Z.ZZ.EZTVFM.SAM.ESDS',0,VSAM,CAT=DOSCAT,            X
/*             DISP=(NEW,DELETE),RECORDS=2000,RECSIZE=8192
// EXEC  PGM=YP5132
01 WRG144
02 + 40GAZELLE                                 9999
02 - 41GAZELLE                                 9999
03 012345
03 288632
/*
/. S0060
* ********************************************************************
*  PCSSM21Z S0060 SORT   - SORT MIGHTYO TO REMOVE HEADER DATE        *
* ********************************************************************
// DLBL SORTIN1,'PCSS.MIGHTY2.Q255137.MVC',,VSAM,CAT=DOSCAT
// DLBL SORTOUT,'PCSS.MIGHTY2.Q255137.MVC',,VSAM,CAT=DOSCAT
// EXEC SORT,SIZE=512K
   INCLUDE COND=(1,03,NE,C'000',&,4,16,NE,C'0000000000000000'),        X
           FORMAT=CH
   SORT   FIELDS=(1,19,CH,A)
   RECORD TYPE=F,LENGTH=61
   INPFIL VSAM
   OUTFIL ESDS,REUSE
/*
/. S0080
* ********************************************************************
*  PCSSM21Z S0080 SORT   - SORT/MERGE NEW AND OLD MIGHTY             *
* ********************************************************************
/* INPUT FILE
// DLBL SORTIN1,'PCSS.MIGHTY2.Q255137.MVC',,VSAM,CAT=DOSCAT
// DLBL SORTIN2,'PCSS.MIGHTY3.Q255137.MVC',,VSAM,CAT=DOSCAT
// DLBL SORTOUT,'PCSS.MIGHTY.Q255137.MVC',,VSAM,CAT=DOSCAT
// EXEC SORT
   SORT FIELDS=(1,41,CH,A),FILES=2
   RECORD TYPE=F,LENGTH=61
   INPFIL VSAM
   OUTFIL ESDS,REUSE
/*
// GOTO JEND
/*
/. ABEND
* ********************************************************************
*  PCSSM21Z ABEND                                                    *
* ********************************************************************
// EXEC   PGM=JOBABEND,SIZE=AUTO
/*
/. JEND
* ********************************************************************
*  PCSSM21Z JEND                                                     *
* ********************************************************************
// EXEC   LISTLOG
/*
/&
* $$ EOJ
   

Return to the Sample Job Stream List

Translated JCL (MVS)

//PCSSM21Z JOB (PCSSM21Z),'                    ',
//             CLASS=A,
//             MSGCLASS=X,
//             MSGLEVEL=(1,1),
//             REGION=6M
//*
//JOBLIB  INCLUDE MEMBER=JOBLIB
//*
//* ********************************************************************
//*  PCSSM21Z LOYALTY PROGRAM FOR GAZELLE CARD                         *
//* ********************************************************************
//* ********************************************************************
//*  PCSSM21Z S0020 M4VBR COPY MIGHTY TO MIGHTY2                       *
//*                       COPY MIGHTY TO MIGHTY3 WITH NODATA           *
//* ********************************************************************
//*ON $ABEND OR $CANCEL GOTO ABEND
//*/. S0020
//*
//*     STEP0010  PGM=ADRDSSU                                           M4VBR
//*
//STEP0010 EXEC PGM=ADRDSSU
//* MODULE M4VBR PROCESSED BY PLUG-IN JCLT4VBR
//*    VS    I DOSCAT   A          'PCSS.MIGHTY.Q255137.MVC'            COPY
//#COPY    DD  DUMMY,DSN=MVS.PCSS.MIGHTY.Q255137.MVC
//* VS VS    O DOSCAT   A          'PCSS.MIGHTY2.Q255137.MVC'           COPY
//#COPY    DD  DUMMY,DSN=MVS.PCSS.MIGHTY2.Q255137.MVC
//* PR O
//SYSPRINT DD  SYSOUT=*
//* CD I
//SYSIN    DD  *
 COPY -
   DATASET( -
     INCLUDE( -
       MVS.PCSS.MIGHTY.Q255137.MVC -
            )) -
   SHARE -
   VOLCOUNT(ANY) -
   RENUNC( -
     (MVS.PCSS.MIGHTY.Q255137.MVC,MVS.PCSS.MIGHTY2.Q255137.MVC) -
            ) -
   REPLACEUNCONDITIONAL
 IF LASTCC=4 THEN SET MAXCC=16
/*
//*
//*     STEP0020  PGM=IDCAMS                                            M4VBR
//*
//STEP0020 EXEC PGM=IDCAMS
//* MODULE M4VBR PROCESSED BY PLUG-IN JCLT4VBR
//*    VS    I DOSCAT   A          'PCSS.MIGHTY.Q255137.MVC'            DEFINE
//#MODEL   DD  DUMMY,DSN=MVS.PCSS.MIGHTY.Q255137.MVC
//* VS VS    O DOSCAT   A          'PCSS.MIGHTY3.Q255137.MVC'           DEFINE
//#DEFINE  DD  DUMMY,DSN=MVS.PCSS.MIGHTY3.Q255137.MVC
//* PR O
//SYSPRINT DD  SYSOUT=*
//* CD I
//SYSIN    DD  *
 ALLOCATE DS('MVS.PCSS.MIGHTY3.Q255137.MVC') NEW CATAL +
          LIKE('MVS.PCSS.MIGHTY.Q255137.MVC')
/*
//*
//* ********************************************************************
//*  PCSSM21Z S0040 YP5132 - EXTRACT TXNS FROM XXOLS AND XXAHF         *
//* ********************************************************************
//*/. S0040
//*
//*     STEP0030  PGM=YP5132
//*
//STEP0030 EXEC PGM=YP5132
//* VS VS KS I DOSCAT              'PCSS.XXAHF'
//XXAHF    DD  DSN=MVS.PCSS.XXAHF,
//             DISP=SHR
//* VS VS KS I DOSCAT              'PCSS.XXOLS'
//XXOLS    DD  DSN=MVS.PCSS.XXOLS,
//             DISP=SHR
//* VS VS ES I DOSCAT              'PCSS.MIGHTY2.Q255137.MVC'
//MIGHTYO  DD  DSN=MVS.PCSS.MIGHTY2.Q255137.MVC,
//             DISP=OLD
//* SD W            EZTVFM       /0/0 OPT=Y
//* VS VS ES O DOSCAT              'PCSS.MIGHTY3.Q255137.MVC'
//MIGHTYN  DD  DSN=MVS.PCSS.MIGHTY3.Q255137.MVC,
//             DISP=SHR
//* PR O SYSLST 00E 0001
//SYSPRINT DD  SYSOUT=(J,,1PLY)
//SYSOUT  INCLUDE MEMBER=SYSOUT
//* CD I SYSIPT 00C
//SYSIN    DD  *
01 WRG144
02 + 40GAZELLE                                 9999
02 - 41GAZELLE                                 9999
03 012345
03 288632
/*
//*
//* ********************************************************************
//*  PCSSM21Z S0060 SORT   - SORT MIGHTYO TO REMOVE HEADER DATE        *
//* ********************************************************************
//*/. S0060
//*
//*     STEP0040  PGM=SORT
//*
//STEP0040 EXEC PGM=SORT,PARM='RESET'
//* MODULE SORT PROCESSED BY PLUG-IN JCLTSORT
//* VS VS    I DOSCAT     SORTIN1  'PCSS.MIGHTY2.Q255137.MVC'
//SORTIN   DD  DSN=MVS.PCSS.MIGHTY2.Q255137.MVC,
//             DISP=OLD
//* VS VS ES O DOSCAT              'PCSS.MIGHTY2.Q255137.MVC'
//SORTOUT  DD  DSN=MVS.PCSS.MIGHTY2.Q255137.MVC,
//             DISP=SHR
//* PR O
//SYSOUT   DD  SYSOUT=*
//* CD I
//SYSIN    DD  *
   INCLUDE COND=(1,03,NE,C'000',&,4,16,NE,C'0000000000000000'),        X
           FORMAT=CH
   SORT   FIELDS=(1,19,CH,A)
   RECORD TYPE=F,LENGTH=61
*  INPFIL VSAM
*  OUTFIL ESDS,REUSE
/*
//*
//* ********************************************************************
//*  PCSSM21Z S0080 SORT   - SORT/MERGE NEW AND OLD MIGHTY             *
//* ********************************************************************
//*/. S0080
//*
//*     STEP0050  PGM=SORT
//*
//STEP0050 EXEC PGM=SORT,PARM='RESET'
//* MODULE SORT PROCESSED BY PLUG-IN JCLTSORT
//* VS VS    I DOSCAT     SORTIN1  'PCSS.MIGHTY2.Q255137.MVC'
//SORTIN   DD  DSN=MVS.PCSS.MIGHTY2.Q255137.MVC,
//             DISP=OLD
//* VS VS    I DOSCAT     SORTIN2  'PCSS.MIGHTY3.Q255137.MVC'           VSAME15
//E15IN1   DD  DSN=MVS.PCSS.MIGHTY3.Q255137.MVC,
//             DISP=OLD
//* VS VS ES O DOSCAT              'PCSS.MIGHTY.Q255137.MVC'
//SORTOUT  DD  DSN=MVS.PCSS.MIGHTY.Q255137.MVC,
//             DISP=SHR
//* PR O
//SYSOUT   DD  SYSOUT=*
//* CD I
//SYSIN    DD  *
   SORT  FIELDS=(1,41,CH,A)
   RECORD TYPE=F,LENGTH=61
*  INPFIL VSAM
*  OUTFIL ESDS,REUSE
 MODS E15=(VSAME15F,0)
/*
//*
//* ********************************************************************
//*  PCSSM21Z ABEND                                                    *
//* ********************************************************************
//*GOTO JEND
//*/. ABEND
//*
//*  --> PGM=JOBABEND <-- DELETED
//*
//* ********************************************************************
//*  PCSSM21Z JEND                                                     *
//* ********************************************************************
//*/. JEND
//*
//SCRATCH  EXEC PGM=IEFBR14
//*
//DEL001   DD  DSN=MVS.PCSS.MIGHTY2.Q255137.MVC,DISP=(MOD,DELETE)
//DEL002   DD  DSN=MVS.PCSS.MIGHTY3.Q255137.MVC,DISP=(MOD,DELETE)
//
   

Return to the Sample Job Stream List