z/OS Sample JCL

This document contains sample JCL of the jobs referred to in the installation procedure.


A. Unload COPY.JOB from the medium

The dataset COPY.JOB (label 2) contains the JCL to unload all other existing datasets from medium to disk.

//SAGTAPE JOB SAG,CLASS=1,MSGCLASS=X
//* - - - - - - - - - - - - - - - - -
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD DSN=COPY.JOB,
// DISP=(OLD,PASS),
// UNIT=(CASS,,DEFER),
// VOL=(,RETAIN,SER=<Tnnnnn>),
// LABEL=(2,SL)
//SYSUT2 DD DSN=<hilev>.COPY.JOB,
// DISP=(NEW,CATLG,DELETE),
// UNIT=3390,VOL=SER=<vvvvvv>,
// SPACE=(TRK,(1,1),RLSE),
// DCB=*.SYSUT1
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//

where:

<hilev> is a valid high level qualifier
<Tnnnnn> is the medium number
<vvvvvv> is the desired volser

B. JCLINST1

//JOBNAM1  JOB.... JOB CARD INFORMATION ..
//*
//* THIS JOB COPIES THE MEMBER TLINOS FROM THE DISTRIBUTED
//* APS LOAD LIBRARY INTO AN APF AUTHORISED LIBRARY.
//*
//* THE FOLLOWING CHANGES HAVE TO BE PERFORMED BEFORE RUNNING THIS JOB:-
//*
//* 1. INSERT A VALID JOBCARD.
//* 2. CHANGE THE DATASET NAMES TO SUIT YOUR SITE'S REQUIREMENTS.
//*
//COPY     EXEC  PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN       DD    DISP=SHR,DSN=APS.LDnn
//OUT      DD    DISP=SHR,DSN=ANY.APF.AUTHORISED.LIBRARY
//SYSIN    DD    *
  COPYMOD I=((IN,R)),O=OUT
  S M=TLINOS
/*                                                                

C. JCLINST2

//JOBNAM2  JOB.... JOB CARD INFORMATION ..                              
//*                                                                     
//* THIS JOB ALLOCATES AND INITIALISES THE NON-VSAM AND USER DATA SETS. 
//*                                                                     
//* THE FOLLOWING CHANGES HAVE TO BE PERFORMED BEFORE RUNNING THIS JOB:-
//*                                                                     
//* 1. INSERT A VALID JOBCARD.                                          
//* 2. CHANGE PREFIX TO SUIT YOUR SITE'S REQUIREMENTS                   
//* 3. CHANGE UUUU TO THE REQUIRED UNIT.                                
//* 4. CHANGE VVVVVV TO THE REQUIRED VOLSER(S).                         
//*                                                                     
//ALLOCATE EXEC PGM=IEFBR14                                             
//* USER SOURCE FILE                                                    
//USERSOUR DD DSN=PREFIX.USER.SOURCE,                                   
//            DISP=(NEW,CATLG,DELETE),UNIT=UUUU,                        
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120,DSORG=PO),            
//            SPACE=(CYL,(2,,28)),                                      
//            VOL=SER=VVVVVV                                            
//* USER LOAD LIBRARY                                                   
//USERLOAD DD DSN=PREFIX.USER.LOAD,                                     
//            DISP=(NEW,CATLG,DELETE),UNIT=UUUU,                        
//            DCB=(RECFM=U,BLKSIZE=6447,DSORG=PO),                      
//            SPACE=(CYL,(10,,28)),                                     
//            VOL=SER=VVVVVV                                            
//* USER MAP LIBRARY                                                    
//MAPS     DD DSN=PREFIX.MAPS,                                          
//            DISP=(NEW,CATLG,DELETE),UNIT=UUUU,                        
//            DCB=(RECFM=U,BLKSIZE=6447,DSORG=PO),                      
//            SPACE=(CYL,(2,,28)),                                      
//            VOL=SER=VVVVVV                                            

D. JCLINST3

//JOBNAM3  JOB.... JOB CARD INFORMATION ..
//*
//* THIS JOB ALLOCATES AND INITIALISES THE SYSTEM DATA CONTAINERS
//*
//* NOTE THAT YOU MAY HAVE TO RUN JOB JCLINSTD TO UPDATE THE SYSTEM
//* DATASET TO THE LATEST SM LEVEL AFTER RUNNING THIS JOB.
//*
//* PERFORM THE FOLLOWING CHANGES BEFORE RUNNING THIS JOB:
//*
//* 1. INSERT A VALID JOBCARD.
//* 2. CHANGE PREFIX TO SUIT YOUR SITE'S REQUIREMENTS
//* 3. CHANGE VVVVVV TO THE REQUIRED VOLSER.
//* 4. FOR SYSPLEX-WIDE SHARED DATASETS, ADD LOG(NONE) TO EACH CLUSTER.
//*
//ALLUSER  EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD   *
 DELETE (PREFIX.COMSYS.USERDEF)
 DEFINE CLUSTER(NAME(PREFIX.COMSYS.USERDEF) -
    VOLUME(VVVVVV) -
    INDEXED -
    RECORDSIZE(2041 2041) -
    RECORDS(4096 512) -
    KEYS(16 0) -
    CISZ(4096))-

 
DATA(NAME(PREFIX.COMSYS.USERDEF.DATA) -
    SHAREOPTIONS(2,3)) -
 INDEX(NAME(PREFIX.COMSYS.USERDEF.INDX) -
    SHAREOPTIONS(2,3))
/*
//ALLCATLG EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD   *
 DELETE (PREFIX.COMSYS.CATALOG)
 DEFINE CLUSTER(NAME(PREFIX.COMSYS.CATALOG) -
    VOLUME(VVVVVV) -
    INDEXED -
    RECORDSIZE(313 313) -
    RECORDS(512 64) -
    KEYS(16 0) -
    CISZ(4096))-
 DATA(NAME(PREFIX.COMSYS.CATALOG.DATA) -
    SHAREOPTIONS(2,3)) -
 INDEX(NAME(PREFIX.COMSYS.CATALOG.INDX) -
    SHAREOPTIONS(2,3))
/*
//*
//INIT     EXEC  PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//COMSYS3  DD  DSN=PREFIX.COMSYS.USERDEF,DISP=SHR
//COMSIN3  DD  DSN=PREFIX.SYSTEM.USERDEF,DISP=SHR
//COMSYS4  DD  DSN=PREFIX.COMSYS.CATALOG,DISP=SHR
//COMSIN4  DD  DSN=PREFIX.SYSTEM.CATALOG,DISP=SHR
//SYSIN    DD  *
 REPRO INFILE(COMSIN3) OUTFILE(COMSYS3)
 REPRO INFILE(COMSIN4) OUTFILE(COMSYS4)
/*

E. JCLINST4

//JOBNAM4  JOB.... JOB CARD INFORMATION ..                              
//*                                                                     
//* THIS JOB ALLOCATES AND INITIALISES THE CAPTURE DATA SETS.           
//*                                                                     
//* THE FOLLOWING CHANGES HAVE TO BE PERFORMED BEFORE RUNNING THIS JOB  
//*                                                                     
//* 1. INSERT A VALID JOBCARD.                                          
//* 2. CHANGE PREFIX TO SUIT YOUR SITE'S REQUIREMENTS                   
//* 3. CHANGE VVVVVV TO THE REQUIRED VOLSER(S).                         
//*                                                                     
//ALLOC    EXEC  PGM=IDCAMS                                             
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  *                                                        
 DELETE PREFIX.VSAM.CAPTUR1                                             
 DELETE PREFIX.VSAM.CAPTUR2                                             
 DEFINE CLUSTER -                                                       
        ( NAME (PREFIX.VSAM.CAPTUR1) -                                  
          NONINDEXED -                                                  
          SHAREOPTIONS (1) -                                            
          RECORDSIZE (0032 4096) -                                      
          SPEED REUSE ) -                                               
        DATA -                                                          
        ( NAME (PREFIX.VSAM.CAPTUR1.DATA) -                             
          CISZ (8192) -                                                 
          VOLUMES (VVVVVV) -                                            
          CYLINDERS (3 0))                                              
 DEFINE CLUSTER -                                                       
        ( NAME (PREFIX.VSAM.CAPTUR2) -                                  
          NONINDEXED -                                                  
          SHAREOPTIONS (1) -                                            
          RECORDSIZE (0032 4096) -                                      
          SPEED REUSE ) -                                               
        DATA -                                                          
       ( NAME (PREFIX.VSAM.CAPTUR2.DATA) -                              
          CISZ (8192) -                                                 
          VOLUMES (VVVVVV) -                                            
          CYLINDERS (3 0))                                              
/*                                                                      
//INIT     EXEC PGM=TUSACAPT                                
//STEPLIB  DD DSN=PREFIX.LOAD,DISP=SHR                                  
//CAPTUR1  DD DSN=PREFIX.VSAM.CAPTUR1,DISP=SHR                          
//CAPTUR2  DD DSN=PREFIX.VSAM.CAPTUR2,DISP=SHR                          
//*                                                                     

F. JCLINST5

//JOBNAM5  JOB.... JOB CARD INFORMATION ..                              
//*                                                                     
//* THIS JOB ALLOCATES AND INITIALISES THE SPOOL DATA SET.              
//*                                                                     
//* THE FOLLOWING CHANGES HAVE TO BE PERFORMED BEFORE RUNNING THIS JOB  
//*                                                                     
//* 1. INSERT A VALID JOBCARD.                                          
//* 2. CHANGE PREFIX TO SUIT YOUR SITE'S REQUIREMENTS                   
//* 3. CHANGE VVVVVV TO THE REQUIRED VOLSER.                            
//*                                                                     
//*                                                                     
//ALLOC    EXEC  PGM=IDCAMS                                             
//SYSPRINT DD    SYSOUT=*                                               
//SYSIN    DD  *                                                        
 DELETE PREFIX.SPOOL                                                    
 DEFINE CLUSTER -                                                       
        ( NAME (PREFIX.SPOOL) -                                         
          NUMBERED -                                                    
          SHAREOPTIONS (2 3) -                                          
          RECORDSIZE (2040 2040) -                                      
          SPEED REUSE ) -                                               
        DATA -                                                          
        ( NAME (PREFIX.SPOOL.DATA) -                                    
          CISZ (2048) -                                                 
          VOLUMES (VVVVVV) -                                            
          CYLINDERS (5 0))                                              
/*                                                                      
//INIT     EXEC PGM=TUMSUTIL                                            
//STEPLIB  DD DSN=PREFIX.LOAD,DISP=SHR                                  
//COMSPL   DD DSN=PREFIX.SPOOL,DISP=SHR                                 
//SYSLST   DD SYSOUT=*                                                  
//SYSIN    DD *                                                         
INIT RECS=1350                                                          
/*                                                                      

G. JCLINSTE

//JOBNAME  JOB.... JOB CARD INFORMATION ..
//*
//* THIS JOB ALLOCATES AND INITIALISES THE SD DATA SET.
//*
//* THE FOLLOWING CHANGES HAVE TO BE PERFORMED BEFORE RUNNING THIS JOB:-
//*
//* 1. INSERT A VALID JOBCARD.
//* 2. CHANGE PREFIX TO SUIT YOUR SITE'S REQUIREMENTS
//* 3. CHANGE VVVVVV TO THE REQUIRED VOLSER.
//* 4. CHECK THE IDCAMS PARAMETERS CISZ, RECORDSIZE, CYLINDERS.
//* 5. IF DESIRED, ENTER VALUES FOR RECORDS, SDFILES, DMPSPAC.
//*
//ALLOC    EXEC  PGM=IDCAMS
//SYSPRINT DD    SYSOUT=*
//SYSIN    DD    *
 DELETE PREFIX.VSAM.SD
 DEFINE CLUSTER -
        ( NAME (PREFIX.VSAM.SD) -
          NUMBERED -
          SHAREOPTIONS (2) -
          SPEED REUSE ) -
        DATA -
        ( NAME (PREFIX.VSAM.SD.DATA) -
          CISZ (4096) -
          RECORDSIZE (4080 4080) -
          VOLUMES (VVVVVV) -
          CYLINDERS (70))
/*
//INIT     EXEC  PGM=TUSDUTIL,REGION=1024K,
//           PARM='INIT,RECORDS=,SDFILES=,DMPSPAC='
//*
//* RECORDS=   NUMBER OF VSAM RECORDS TO BE INITIALIZED.
//*            DEFAULT: MAX THAT FITS INTO EXTENTS CURRENTLY ALLOCATED
//*
//* SDFILES=   DIRECTORY SIZE (MAX NUMBER OF SDFILES). DEFAULT: 500
//*
//* DMPSPAC=   SPACE IN MBYTES THAT SHALL BE ASSIGNED FOR THREAD DUMPS.
//*            DEFAULT: 50% OF RECORDS. MAX: 32 MBYTE (IN ANY CASE).
//*            REST WILL BE USED FOR SDFILES.
//*
//STEPLIB  DD    DSN=PREFIX.LOAD,DISP=SHR
//COMSD    DD    DSN=PREFIX.VSAM.SD,DISP=OLD
//SYSPRINT DD    SYSOUT=*