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.
b) DSN :- keyword parameter at DD level.
Ex:-
JCL:-
//job001
//step001 Exec PGM=cob001
// X DD DSN= userid.source.psname1, unit =disk/tape
// AB DD DSN=userid.source.psname2, unit =disk/tape
cobol:-
select cust-file assign to X
select cust-file assign to AB
c) DISP:- used to identify the mode of the file
DISP :- ( Status, normal, abnormal)
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 is not existing 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.
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
Default : DISP = (new, del , del )
Reusable components in JCL: instream procedure
//job001 job(xyz), ‘abc’ class= L MSGclass=D, MSGLEVEL=(1,1), notify=&sysid
//proc001 PROC à procedure reusable component.
//step001 Exec PGM=cob001
//I1 DD DSN=use.input, disp=SHR
//I2 DD “ “ “ “= OLD
// PEND
//step002
//
//step100 Exec PROC001
how to change parameters in procedure(instream)
//job001 job(xyz), ‘abc’ class= L MSGclass=D, MSGLEVEL=(1,1), notify=&sysid
//proc001 PROC à procedure reusable component.
//step001 Exec PGM=cob001
//I1 DD DSN=use.input, disp=SHR
//I2 DD “ “ “ “= OLD
// PEND
//step002
//
//step100 Exec PROC001
//step001 DD DSN=op2 disp=NEW
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 inaddition to the primary memory
4) RLSE:- releases the unused space when peg terminates successfully/unsuccessfully.
SPACE=(TRK,(10,10), RLSE)
a) Data Control Block:- this contains the following keyword parameters used to specify file attributes.
LRECL:- logical record length =100 fixed length/ variable length.
BLKSIZE:- blocksize (LRECL * 10)
RECFM :- f & fb= fixed length
V & vb= variable length
f/fbà LRECL=100.
v/vbàLRECL=maxlength + 4
DSORG : ps/po(pds) (dataset organization)
Pds: partitioned dataset
Ps: physical sequent ional file
FBA- fixed block attribute
VBA- variable block attribute
Printer :- 1 byte attribute character (system defined)
0 – line
1 – page
the record length for a printer it should 1+132=133
to print the data, record length must be 132 +| 1. printer control character
DCB= ( LRECL=133, blksize= 133 * 10,RECFM=fba, DSORG=ps)
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
……………..
……………..
No comments:
Post a Comment