Input can come from a file (dataset)
or instream data (part of the JCL stream)
Output can go to a file (dataset)
or print queue (Usually sent to some kind of printer or HOLD queue)
//SYSUT1 DD DSN=CCPM44.SERIES,DISP=SHR
-------------------------------------------------------------------------------------------------------------------------------
When Input is a member of a catalogued PDS
// SYSUT1 DD DSN=CCPM53.CSC.CNTL(GARBAGE),DISP=SHR
-------------------------------------------------------------------------------------------------------------------------------
When Input is instream data (in JCL input stream)
// SYSUT1 DD * input data follows
immediately after this card
1234
5678
9938
/*
-------------------------------------------------------------------------------------------------------------------------------
Can //ANY DD be used to give input
to IEBGENER?
//SYSUT2 DD DSN=CCPM44.SERIES,DISP=OLD
-------------------------------------------------------------------------------------------------------------------------------
Output is to a file member of a catalogued PDS
//SYSUT2 DD DSN=CCPM53.CSC.CNTL(NEWSTUFF),DISP=OLD
-------------------------------------------------------------------------------------------------------------------------------
Output to a print queue
//SYSUT2 DD SYSOUT=X < X - HELD OUTPUT QUEUE
------------------------------------------------------------------------------------------------------------------------------
Can //ANY be used to route output from IEBGENER?
-------------------------------------------------------------------------------------------------------------------------------
DSN - Data set name
DISP
- Start_status - specify whether exclusive or share
SHR - data set already exists and others can read concurrently.
OLD - dataset already exists
MOD – dataset may or may not exist.
- normal_end
DELETE - Erase catalogue entry and VTOC
PASS - Give location of dataset to next job steps
KEEP - Put entry in VTOC if one does not exist
UNCATLG - Erase from system catalogue
- abend
DELETE - Erase catalogue entry and VTOC
KEEP - Put entry in VTOC if one does not exist
UNCATLG - Erase from system catalogue
DISP - start_status - always exclusive use
NEW - dataset
does not exist
- system will write at the next available
space
MOD - dataset
may or may not exist
- If dataset is new, system will start
at the next available space
- If dataset exists, new records will be put at the end of the existing
file.
normal_end -
CATLG
- Catalogue when step ends
DELETE
- Erase from catalogue and VTOC
PASS
- Give location of dataset to next job steps
KEEP
- Put in VTOC
- abend
CATLG
- Catalogue when step ends
DELETE
- Erase from catalogue and VTOC
KEEP
- Retain but do not catalogue.
BLKSIZE - blocking factor.
if RECFM
=FB - multiple of LRECL
=F - equal to LRECL
=V - optimal device block size
=VB - LRECL+4 if RECFM
=U - installation standards
UNIT - at DePaul always use SYSDA
VOL=SER= - use specific volume
reference when the JCL needs to use volume
references. At DePaul USER00, USER01, or USER02.
//STEPNAME EXEC PGM=IEFBR14
//ANYNAME DD DSN=CCPH00.CSC.TEST,DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,1),
// DCB=(BLKSIZE=4000,LRECL=80,RECFM=FB)
If all the SYSOUT references in a JOB
are to use the same parameters, code
them once on an OUTPUT statement and
place the OUTPUT statement
between the JOB and first EXEC statement.
Some special OUTPUT parameters
DEFAULT=
YES -- This statement applies to all SYSOUT DD statements
that do not have an explicit OUTPUT reference explicitly
naming a different OUTPUT statement.
NO -- The output parameters apply only when explicitly
referenced by use of a SYSOUT OUTPUT parameter.
CLASS
Appropriate SYSOUT class of the installation.
CLASS=* gets MSGCLASS value of JOB statement.
//JPETLICJ JOB 01,'BIN
MYNAME',MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=JPETLIC
//JOBDFLT OUTPUT
DEFAULT=YES,JESDS=ALL,COPIES=2,DEST=AC
//*
//STEPA EXEC PGM=IEBGENER
//SYSUT1
DD DSN=JPETLIC.CSC.CNTL(GARBAGE),DISP=SHR
//SYSUT2
DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN
DD DUMMY
//*
//STEPB EXEC PGM=IEBGENER
//STEPDFLT OUTPUT
DEFAULT=YES,COPIES=3,DEST=LPC
//SYSUT1
DD DSN=JPETLIC.CSC.CNTL(GRADES),DISP=SHR
//SYSUT2
DD SYSOUT=D
//SYSPRINT DD SYSOUT=D
//SYSIN
DD DUMMY
//JPETLICJ JOB 01,'BIN
MYNAME',MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=JPETLIC
//STANDARD OUTPUT DEFAULT=YES,COPIES=2,DEST=AC,JESDS=ALL
//STEPA
EXEC PGM=IEBGENER
//LOOP
OUTPUT DEST=AC,CLASS=D,COPIES=2
//LPARK
OUTPUT DEST=LPC,CLASS=X
//SYSUT1
DD DSN=JPETLIC.CSC.CNTL(GARBAGE),DISP=SHR
//SYSUT2
DD SYSOUT=(,),OUTPUT=(*.LOOP,*.LPARK)
//SYSPRINT DD SYSOUT=*
//SYSIN
DD DUMMY
IEHLIST
//stepname EXEC
PGM=IEHLIST
//SYSIN
DD input IEHLIST control statement
//resource
DD disk volume containing the dataset
//SYSPRINT
DD message listing
//CCPH00A JOB 1,'BIN
13 -- PETLICKI',MSGCLASS=X,MSGLEVEL=(1,1)
//STEP1
EXEC PGM=IEHLIST
//RESOURCE DD UNIT=SYSDA,VOL=SER=USER02,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTPDS
DSNAME=CCPH00.CSC.CNTL,VOL=SYSDA=USER02
//* The listpds
format is
//* LISTPDS
DSNAME=pdsname,VOL=device_name=volid
//**************************************************************************************************
//STEP2
EXEC PGM=IEHLIST
//RESOURCE DD UNIT=SYSDA,VOL=SER=USER02,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTVTOC VOL=SYSDA=USER02
//* The listvtoc
format is
//* LISTVTOC VOL=device_name=volid
Create a multi-step JCL job that will create and delete datasets and copy members between datasets.