JCL interview questions and answers
JCL interview questions
1. When do we create temporary dataset and what is the syntax ?
Temporary datasets can be created either not specifying any DSNAME or by specifying the the temporary file as DSN=&&TEMP.
We use temporary datasets to carry data from one step to other step and we don't want the dataset to be retained once the job completes.
2. A PROC had five steps. step 2 has a condition code. How we can override this condition code ?
By using the COND keyword on EXEC statement we can override the condition codes. The following is the exaple to override the condition code of any particular step inside proc.
Eg: //STEP01 EXEC proc_name,COND.step_name=value
in the above example the condition parameter of the step specified in place of step_name will be replaced with the value specified.
3. What is COND=EVEN
The COND parameter used to control the flow of execution. If job terminates abnormally at particular step, the remaining steps followed by the abnormally ended step will not execute. COND=EVEN tells execute this step even the above step terminated(ended) abnormally.
Eg: //STEP01 EXEC PGM=pgm1,COND=EVEN