JCL Quick Study for Interview
Here is a quick study for IBM mainframe JCL for quick preparation for your interviews
DSN - Data Set Naming rules:
- Dataset Name must not end with a period.
- A DSN can contain only national characters and '-'. Hyphen is not allowed in a PDS member.
- Maximum 44 characters allowed.
- Each qualifier must be 1-8 alphanumeric characters, the first character should be alphabetic.
Here is a table with limitations on the maximum and minimum in JCL,
|Number of Steps||255||1|
|Number of DD State||3273||0|
|Number of Instream PROCS||15||0|
|Job Execution time||248.5 Days||0|
|Job Name||8 Chars||1|
|Accounting Information size||142||0|
|Step name||8 Chars||1|
|Symbolic Parameter||100 Chars||1|
|Concatenated Dataset||255 PS|
|GDG limit||255 active|
DSN - Data Set Spacing:
- One block constitutes 32KB of formatted memory/ 42KB of Unformatted memory.
- 6 blocks makes one Track & 15 Tracks makes one cylinder.
Rules for Overriding Parameters:
- A PGM parameter cannot be override.
- The parameters for each step do not need to be coded in the same order as they appear on the procedure EXEC statement.
- To add/override a parameter on an EXEC statement, use parm.procstep=value.
- If a parameter which does not exist is coded on the EXEC statement, the parameter will be added.
- All parameters for each step must be coded in the order the first step must be coded first, second step second and so on.
Overriding DD Statements:
- DD statement overrides precede the DDname with the proc step name (PROC.DDNAME).
- The JCL parameter is replaced, unless it does not exist on the original statement, in which case it is added.
- For the DCB parameter, each sub parameter can be overridden.
- DD statement overrides should carry DD names that already exist in the step to take effect.
- DD statement overrides must be coded preceding any added DD statements for the proc step (for concatenated dd).
- DD override statements must be listed in the order in which they are shown in the proc.
- DD override statements are only in effect for the duration of the run.
Overriding concatenated datasets:
- If you specify only one DD, it overrides the first DSN alone.
- If you want to override specific DSN, use DD blank for other DSNs.
- If you want to override each DSN, use corresponding DD name.
- If you don't want any of the DSN in step, use DD DUMMY for that.
- All DD statements after override with DUMMY will be ignored.
- You must specify a separate DD statement for each DD in the concatenation.
- You can ADD additional DD statements in the overriding JCL.
- Max 255 PS can be concatenated.
- Max 16 PDS can be concatenated.
- DatAsets with different record lengths can be concatenated as long as the dataset with the largest blocksize appears first.
- PDS libraries can be concatenated
INSTREAM Data / SYSIN:
- You can pass more than 80 characters to a cobol ACCEPT verb. by specifying , followed by X in 71 and 72 columns.
- Maximum PARM Length = 100 bytes
- If the step name is not specified, override applied only to FIRST step.
- Additions should be followed by modifications. i.e modifications first.
- To omit a parameter, just name it, but dont pass the value.
Special DD Names:
- SYSUDUMP - Prints the program area, content of registers and gives a trace back of subroutines called.
- SYSABEND - SySUDUMP + Nucleus.
- SYSMDUMP - SYABEND in machine format.
- * (asterik) is a referback operator Parameters.
- DCB, DSN, OUTPUT, PGM and VOL=SER can be refered back.
- DISP = (Start status, Normal End Status, Abend status).
- Default = (NEW, DELETE, DELETE) for a new dataset.
- 'PASS' disposition is applicable only for normal end status.
- The DISP parameter on the DD statement, or the TSO ALLOCATE command, can be used to put a lock on a system data set so that you can update the data set. Specify DISP=OLD whenever you update a data set.
- If you code DISP=SHR in your JCL, realize that the data set you are updating may be simultaneously updated by another user, resulting in an unusable data set.
- Values are passed after the EXEC PROC=PROCNAME separated by comma.
- SET can be used to set the values for the symbolic parameters.
- If a period is followed by a symbolic variables, it will be consumed on substitution.
SET S1=A, S2=B, S3=C
|Symbolic Variables||Substituted Value|
|&S1.&S2..&S3A||Syntax Error ==> No such variable S3A|
- It is mandatory to specify the DISP parameter for temp datasets.
- If PASS is not specified, dataset will not be passed.
- If DISP is not mentioned Dataset will be deleted in the same step.
System utility programs:
System utility programs are used to list or change information related to data sets and volumes, such as data set names, catalog entries, and volume labels.
To list system control data.
To build and maintain system control data.
Data Set Utility Programs:
You can use data set utility programs to reorganize, change, or compare data at the data set or record level. These programs are controlled by JCL statements and utility control statements.
- Copy, compress, or merge partitioned data sets or PDSEs.
- Add RLD count information to load modules.
- Select or exclude specified members in a copy operation.
- Rename or replace selected members of partitioned data sets or PDSEs.
- Compare records in sequential or partitioned datasets.
- Create a test data set consisting of patterned data.
- Selectively copy job steps and their associated JOB statements.
- Copy records from a sequential data set or convert a data set from sequential organization to partitioned organization.
- Incorporate changes to sequential or partitioned datasets.
- Register catalog Procedure in System Catalog.
- Unload, load, copy, or print an ISAM data set.
- Print or punch records in a sequential or partitioned data set
Utility control statements:
- Utility control statements are used to identify a particular function to be performed by a utility program and, when required, to identify specific volumes or data sets to be processed.
- Utility control statements are usually included in the input stream. However, they may also be placed in a sequential data set, or in a member of a partitioned data set or PDSE. In either case, the data set
must have fixed or fixed blocked records with a logical record length of 80.
- Nesting of PROC allowed up to 15 levels.
- A Cataloged PROC cannot have an instream PROC.
Generation Data Groups (GDG):
- Functionally related datasets.
- GDG Base can be created using IDCAMS or IEHPROGM utilities.
- A model dataset lable is a pattern for the dataset label created for any dataset named as a part of the GDG group. The system needs an existing dataset to serve as a model to supply the DCB parameters for a GDG creation.
- Omitting the generation number will concatenate all generations available.
- Within a same job use the generation (+1) etc to refer to the dataset created in previous steps.
- Generation number is assigned only at the completion of a job.
|S0C1||Operation exception error - e.g Missing DD|
|SOC4||Memory exception - Eg. subscript|
|S0C7||Data exception - Numeric data|
|S013-18||Specified member not available in PDS|
|S122||Operator cancels job with a request dump|
|S222||Operator cancels job without a dump|
|S322||Auto cancel of job due to system timeout parameter|
|S522||Time exceeded in wait state . e.g dataset not available|
|S722||Auto cancel of job due to LINES parameter in the job|
|S80A||Cannot find enough virtual storage - Increase the REGION value|
|S806||Load module not found|
|SB37||Exceeded the primary and secondary spaces allocation|
|SD37||Secondary space not mentioned or insufficient|
|SE37||No more space available in volume (no space for PDS members)|