Professional Documents
Culture Documents
C
#408,PAVANI PRESTIGE,AMEERPET.
CONTACT NO:040-55462382
Parameters:-
(I) Job parameters:-
1. Positional: - (1 to 20 alphanumeric)
These parameters are mandatory which must be coded after operands with minimum one
task.
All positional parameters must be coded in predefined order.
Types:-
a) Accounting info:- this parameter must be coded first immediate after the
operand. This must consists of 1 to 20 alphanumeric characters.
This is used to record JOB CPU TIME of IBM server & this is used for billing
purpose
b) Program name: - this is second positional parameter at Job level which must be
coded after accounting info. Separated by comma, which can be used for
documentation purpose, this must be coded with 1-20 alphanumeric & also it can
be user defined.
2. Keyword parameter:-
A=40 min
B=70 min
C=2 hrs
…..
Z=15 hrs
0= 40 min
1= 1hrs
2= 3 hrs
…….
9= 19hrs.
All keyword parameters are optional which are coded depending on requirement
after the positional parameters, separated by comma
Types:-
a) Class: - This is used to categorize the job based on the CPU utilization.
Class= {0-9, A-Z} or predefined in the system
If the class is ignored/ not coded the default class parameter will be assumed
depending on the installation
Note: - Default parameter can be got from the operator.
Class parameter must be coded always in the Job level.
b) Prty :- (priority parameter). This is a keyword parameter, which can be coded
anywhere after positional parameter which is used to set the priority to the Job.
PRTY= 0-15 /14
0= Low priority
14= High priority.
c) MSGCLASS: - this is a keyword parameter can be coded anywhere after positional
parameter. This is used to route system related messages to the specified destination. This
will be decided at the time of installation destinations are
DISK/TAPE/PRINTER/SPOOL.
In any mainframe system messages related to DD/Exec/JOB are routed
SPOOL/DEVICES/PRINTER default is the SPOOL
A………I –disk
J……….M-printer
Q………Z- tape
Spool: - this is system defined dataset and it is created by MVS O/S. in general the
default destination is SPOOL
MSGS :-
0---Abnormal termination
1---Normal termination
Default (1, 1)
This is a keyword parameter which is used to control volume of the messages as per the
requirement. MSGLEVEL parameter has 2 sub parameters which are positional
parameters. Those are.
e) Typrun:- this is another keyword parameter which is used to check the syntax errors
of JCL must be coded at job level
To check syntax errors (TYPRUN= SCAN)
To check execute JCL (TYPRUN=RUN)
Used to hold the job and release to the O/S based on priority (TYPRUN=HOLD)
JCL syntax errors can also be checked by using control list language (CLIST) command
CLIST is similar to JCL this is used to generated tools and also used for syntax errors of
JCL
When hold is specified in on line peg, MVS is going to place all jobs in queue
which is a dataset crated by o/s and depending on priority the job is going to be released
SYSIN DD * :-
SYSIN is a system defined DD name and * is the positional parameter off DD. This is
used to pass data to COBOL peg/ to pass system defied commands to system defied pegs.
SYSIN DD * INSTREAM data must always be terminated with /*
Any number of records/data/character must be declared in W S S
One row in SYSIN DD * is equivoque to one accept statement
JCL:
//step001 Exec PGM=cob001
//sysin DD *
[2004-10-10
………….
………….]
/*
//(terminator/end if JCL)
cobol:-
W.S.S
01 ws=data1 pic x(10)
01 ws=data2 pic x(10)
PD
1000-para
accept ws-data1
accept ws=data2
(III) DD parameters:-
a) * :- positional parameter at DD level used only with SYSIN. To pass data to the
COBOL programs this is known as instream data any number of records can be
passed to the peg.
Status:
NEW:- creating the dataset first time
OLD:- already created. Accessing the dataset all resources are allocated exclusively. No
other user can access until ti is released by the current user. If dataset does not exist this
creates.
SHR:- the dataset can be accessed by multiple users at a time
MOD:- appending the records to the existing records
Adv:- if dataset is not existing, then MOD is assumed as NEW and writes records to the
dataset.
Normal:- all the parameters of normal are active when the job executes successfully
Delete:- dataset is deleted when job executes successfully
Keep:- it keeps dataset in system. But it doesn’t create any reference in catlg
Catlg:- when job terminates successfully it is going to create an index by a referencing
name specified in volume label. This keeps dataset
Eg: catlg: volume 4
Uncatlg:- it resides in system, but it deletes volume label name form catlg like KEEP.
Pass:- to pass dataset to subsequent steps
Abnormal:-
Delete:- deletes
Keep:- keeps in system
Catlg:- creates index in catlg
Uncatlg:- delete index from catlg
Symbolic :-
1. these parameters are used in catlg procedures
2. these parameters always must be coded prefix with single &
Overiding:-
1. overriding parameter is used in instream procedures
2. stepname must be used as DD name
Restart:-
Restarting a program which is abounded at some step-step0020 (step0019 are executed
already )
RESTART= stepname
When job is submitted first it is going to check for restart.
If temp dataset is created in step0018 after abounding, the temp dataset is refreshed if
restart is coded as step0020, it gives error: Temp dataset not available so code RESTART
= step0018.
Note: - restart must be always coded in the spool only not in the jcl peg.
c) Space:- this is a keyword parameter in DD operand can be coded any where after
DD operand. This is used to request the storage space for the dataset as per the
requirement. The storage space is divided in to primary and secondary for effective
storage space utilization. RLSE parameter is used to release the unused storage space
upon the successful / unsuccessful termination of the job
1) CYLINDERS, BLOCKS, TRACKS AND RECORDS:-different types of storage
2) PRIMARY:- this is the primary which is allocated to the data set while creating
3) SECONDARY: this is additional memory allocated in addition to the primary memory
4) RLSE:- releases the unused space when peg terminates successfully/unsuccessfully.
SPACE=(TRK,(10,10), RLSE)
Ps/pds created
// job001
//
//step001 Exec pgm=cob001
//C1 DD DSN=user.souce.data, disp=old
//SYSIN DD *
record 1
……….
…….
………
/*
//
cob001
select cust-file assign to C1
FD cust-file
……………..
……………..
Note: - if file attribute of logical record are not matched with JCL- DD- DCB
parameters then it will be generated errors. Always there must a match in the FD
block of logical record with the DCB parameter of physical record.
IEFBR14:-
Used to create NILL dataset if creates a new pds/ps
This is a null peg can be used to create/delete physical sequential ddataset
dynamically this is the IBM supplied utility
For creating : disp=(new, catlg, delete)
For deleting : disp=(mod, delete, delete)
Copying from ps to ps
1. ispf 3.3
2. using cobol & jcl
cobol : cob001
i-o section
file control
select input assign i1
select out assign o1
D.D
Fd in1
01 in-rec
fd out1
01 out-rec
P.D
Open input in1
Open output out1
Close in1
Close out1
JCL:- job001
//job001 job
//step001 exec pgm=cob001
//i1 DD dsn=user.source.in1.disp=shr
//o1 DD “ “ .out1 “ “
//sysout DD sysout =*
//sysprint DD ””””
//
IEBGENER:- this is a IBM supplied utility. This is used to copy the data from one
sequential file to another. The DD name must b e SYSut1 and SUSut2.
This can also be used to send reports to one or more users mail ids
Can also be used to send reports to printers
//sysout DD sysout=*
//sysprint DD sysput=*
//
Note: many ps can be copied to one ps only multiple out ps’s cannot be copied
IEBCOPY:
This is a utility supplied by IBM which can be used to copy data from pds to another pds
and ps to ps and tape ot ps and COMPRESS
The copy command must be used in sysin dd * to copy members
Select command can be used to copy selected members
Executed command is used to copy all excepted members specified
Sorting ps:-
1. internal sorting
2. external sorting : utilities: /SORT/ICETOOL/SYNCSORT/DFSSORT/ICEMEN.
Dummy parameter:-
The files of COBOL which are not needed to compiled, because those files are not
changed only some files are changed then we have to make them logically unavailable to
the compilation. This can be done by Dummy parameter
This is system defied parameter which can be used to create/ delete datasets dynamically
by the o/s i.e. this data set is available only during the program execution. Dummy must
be specified in the DD operand or dsn=nullfile can be used
use |: to test the cobol program/ to improve program performance at the time of testing .
to simplify the testing process.
Any number of dummy parameters can be used as per the requirement.
Spool commands:
c- job cancellation
p – pvs page //p
a- to release the hold job from the queue
?- to open the states of job
highest job no- latest job no allocated by the o/s automatically depending on the
requirement.
Dummy:-
1. this is a null file /do nothing file
2. this data set cannot be passed to subsequent steps
3. this can be used to test the application program
4. no dcb,space parameters can be coded
5. any no of dummy ds can be coded in one job
6. dummy must be coded with dummy parameter
Dsn=nullfile
Temp file:-
1. This file is created by o/s dynamically and deleted after completion of job
2. This can be passed to subsequent steps
3. Can be used to test application programs
4. Dcb and space parameter can be coded
5. Any no of temp ds can be coded in one job
6. This must be coded with prefix && and any user defined name.
Joblib:-
This is system defined library/ds which can be used to locate the all the object programs
which are specified.
Must be coded immediately after the job
Only one joblib must be coded in one job
Step lib:-
This is system defined dataset which can be used to locate the object peg at activity level
Can be coded any where in the step
Multiple steplibs can be coded in one job
To server:
// mailid01 job
//act001 exec pgm=IEBGENER
//sysut1 DD dsn=userid.source.cust.data, disp=shr,
//sysut2 DD dsn=” “ mailed(mailid01),disp=old.
//” “ “ subject(subj01), disp=old
//
//sysin DD *
3.45.256.36
/*
//
To printer:
//printer1 job job output prid=rmt004
//act001 DD dsn=userid.source.cust.data, disp=shr,
//systu1 DD dest=(a, prid)
//
To pc:-
//pssystem job
//act001 exec pgm=FTP
//sysut1 DD dsn=user……………….
//output DD *3.23.2365
userid
password
put sysut1+ c:/pc/cust-file
out1
/*
//
// job001 job
//step001 exec pgm=cob002
//i1 DD dsn=…….data.input,disp=shr
//o1 DD “ “ “ .output,disp=shr.
//job002 job
//step001 exec pgm=cob001
//o1 DD dsn=user.source.jcl, disp=shr
//step002 exec pgm=IEBGENER
//sysut1 DD dsn=user.sour.jcl, disp=shr
//sysut2 DD dest=(x,intrdr)
COND:- this is a keyword parameter this can be coded at job level and activity
levels. This will be applicable to all the activities which are coded in the job. Previous
step rc will be checked to execute subsequent steps when cond is and coded.
Cond=(return code, relational operator)
IF statements:-
//jbo001
//step001 exec pgm=cob001
//step002 exec pgm=cob002
//chekr1 if step002.rc=00 then
//step004 exec pgm=cob003
//end-rc1 end-if
query: printing a report/ sending a mail to same id the report should send only when
the ps from which is going to be is non empty.
IEBPTPCH:-IBM supplied utility which can be used to check th empty file the print
command should be used in sysin DD *.
Restart parameter:- this is job level keyword parameter this must be coded at
joblevel only
Restart=stepname
This is used to restart the job from the required step. The following points must be
considered before restating a job
Precautions: -
If statements:- all if statements must be commented out which are started before
abend step and ended after abend step.
Temp ds:- all the temp ds must be considered which are begin before abend step
the restart step name must the stepname where temp ds being is created
Static call:-
Both main and sub programs and object program will be stored in loadlib.
Can be identified by call peg-id in cobol.
Dynamic call:-
Stored in different loadlib storage spaces
Can be identified by cal ws-peg-id in cobol where ws –peg-id is a dn in wss
In stream procedures :-
These are predefined jcl statements within job
This must be coded immediate after the job with proc openrand must be terminated with
pend
Max 15 procedures can be defined within the job. And these procedures will be available
only for the job when procedures are defined
Parameters can be overridden by stepname .ddname as dd name
Ex:- sort logic data from one ps to another
Catolg procedures:-
These are the predefined jcl statements outside of the job
This procedures must be coded in members which must be sorted in pds
Can be executed by any job but location of the procedure must specified with poclib
ddname immediately after the job
Max 255 procedures can be defined in one job
Symbolic parameters (&) must be used to override the parameres that should be coded
prefix with &
Refer back :-
It is used to use the same activity level parameter at one level at another level
This can be used to refer the dataset which are created in the previous steps from
subsequent steps
It must be coded with *.stepname.ddname