-
What statement must be added to have access to private procedures
- After job statement code
- JCLLIB ORDER=location_of_proc
- e.g.
- JCLLIB ORDER=SLC.CPA.SOURCE.PDS
-
To invoke a procedure, making no changes:
//stepname EXEC procname
-
To invoke a procedure and To modify parameters
(not using symbolic parameters)
(not modifying parameter or dd DD or OUTPUT)
- //stepname EXEC procname,
- // parameter.procstepname=value
- notice parameter is 1st and
- procstepname is 2nd
-
To invoke a procedure,
To modify parameters or add DD or OUTPUT stmts
- //procstepname.ddname DD parameter=value…
- //procstepname.ddname OUTPUT parameter=value…
notice procstepname is first
-
To indicate a procedure library:
// JCLLIB ORDER=(libraryname1, libraryname2…)
-
To invoke a procedure, assigning values to symbolic parameters
- //stepname EXEC procname,
- // symbolicparameter=value…
-
Look at the JCL statements:
//
XX
X/
- // are your JCL,
- XX are PROC statements
- X/ are modified statements.
-
never code ______ with TAPE
SPACE
-
what is a special TAPE consideration
never code SPACE with TAPE
-
to nullify the VOL in a PROC
//procstepname,ddname dd VOL=SER=
not VOL=
-
default DISP
- =NEW --> (new,delete,delete)
- =(new,catlg) -->=(new,catlg,catlg)
- =SHR --> =(SHR,KEEP,KEEP)
-
Tape/cartridge data sets
- used for long term storage(archives), backups, stored off line
- sequential I/O only,
- no VTOC, tapes have a volume label and a file header label preceding each file
- misc
- maybe label header
- LABEL=(3,SUL) part of DD statement
- SUL means stardard unit label
-
tempfiles
- &&tempfilename
- can't be qualified
- can use UNIT=VIO(an extension of memory)
-
Write the dd statement to write 2 copies to a printed report with dd name DD4
- DD4 DD SYSOUT *,
- COPIES=2
-
How do you determine the number of files a step opens?
- =# of DD statements
- not # of DSN's because SYSOUT and instream are included
-
//step1 exec pgm=ONE
//DD1 DD DSN=FILE1,
DISP=(new,pass,delete),...
//DD3 DD DSN=FILE2,
// DISP=(shr,keep,keep)
If the first step issues a return code of 16, what will happen to FILE1 and FILE2?Will the second step get executed?
- FILE1 will be passed onto 2nd step and FILE2 will be kept
- Will the second step get executed? yes
-
DISP default parameters
- DISP=(status,normal,abnormal)
- Default: DISP=(NEW,DELETE,DELETE)
- if omit status, default is NEW
- if omit normal, default is KEEP if file exits,
- else DELETE
- if omit abnormal, default is value of normal
-
How to append records onto a sequential file
DISP=(MOD,normal,abnormal)
-
How to allocate set a retention or expiry date
- RETPD=nnnn / EXPDT=yyyy/ddd
- prevents the dataset to be deleted until the date is reached
-
How to allocate multi-volume data sets?
- UNIT=(device,unit-count),
- VOL=SER=(serial-#,serial-#,...)
-
advanced SPACE parameters
SPACE=(unit,(primary[,secondary])[,RLSE][,CONTIG][,ROUND])
-
How to code referbacks
- DSN=*[.stepname].ddname
- DCB=*[.stepname].ddname
- VOL=REF=*[.stepname].ddname
-
when to code VOL=SER
- don't code VOL=SER=? if file is cataloged
- code if not cataloged
- JOBLIB all libraries (PDS)are catalogued, don't code unit and vol
-
UNIT
- if DASD code UNIT=SYSDA,
- code if uncataloged
-
when to code DCB
don't code DCB if file exists, on VTOC
-
SPACE
- don't code if exists, on VTOC
- NEVER code for tape
-
if a file is cataloged don't code
UNIT,VOL and LABEL
|
|