This section presents you various set of Mock Tests related to JCL Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - PROC1 is a in-stream procedure in a JCL and with this name PROC1 one catalog procedure exists, then which procedure will be invoked - catalog or in-stream?
//TXXXXX JOB ,, NOTIFY = &SYSUID // JCLLIB ORDER = (XXXXX.PROCLIB) //STEP1 EXEC PROC1 //PROC1 PROC //STEP1 EXEC PGM = IEFBR14 //DD1 DD DSN = TXXXXX.TEST, SPACE = (TRK,(1,1)), // DCB=(RECFM = FB, BLKSIZE = 8000, LRECL = 80), // DISP=(NEW,DELETE) //PEND
Catalog procedure will be invoked.
Q 2 - What will be the output of following JCL which is calling a catalog procedure?
//TXXXXXJ JOB ,, NOTIFY = &SYSUID, CLASS = A, MSGCLASS = X // JCLLIB ORDER=XXXXX.PROC.LIBRARY //DATA1 EXEC PROC = PROC1, TIME = 3
We are overriding the TIME parameter inside PROC1.
Q 3 - What is the name of program which will be executed in the STEP1?
//XXXXX JOB ,, NOTIFY = SYSUID, CLASS = A, MSGCLASS = X // SET A = PROG1 //STEP1 EXEC PGM = &A //DD1 DD DSN = FILE1, DISP = SHR
SET statement is used to assign the values to symbolic parameters. So value of A is PROG1. So PROG1 will be executed in STEP1.
Q 4 - In-stream procedure is coded as a separate member of a PDS. State whether true or false?
In-stream procedure is coded inside the JCL itself. So this statement is incorrect.
Yes, a catalog procedure can call a in-stream procedure.
Q 6 - What are the type of procedure in JCL?
Catalog and in-stream procedures are used in JCL.
Q 7 - Which method you will use to skip a particular step in JCL?
You can use COND with the step. If condition is true step will be bypassed.
PROC is used for declaring a procedure.
Q 9 - In order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
COND=(12,LT,STEP1), it will read the condition as 12 less than 8, which is false, so this step will be executed.
Q 10 - Up to which level cataloged and in-stream procedure can invoke other procedure?
Cataloged and In-stream procedure can invoke other procedure up to 15 levels only.
Q 11 - If we have created a (+1) generation dataset in the first step of a job then how we can reference it in later steps of the same job for input?
As we have created it in the same JCL, then we use (+1) as its reference.
Q 12 - If we want to use a GDG which is already created by some job, then how to use the reference of the last generation in a JCL?
To refer the last generation of a GDG, we use the reference as (+0).
We use & for symbolic parameters.
Q 14 - Which parameters we use in a JOB statement?
We use positional and keyword parameters in a job statement.
Q 15 - How to send the execution status of a job to a user?
We use NOTIFY parameter to send the status of a job.
Q 16 - Which statement is used to end the in-stream procedure in a JCL?
PEND statement is used to end the in-stream procedure.
Q 17 - What units are used for allocation of output dataset?
In mainframes, we use cylinders, tracks and blocks for allocation of datasets.
Q 18 - Which parameter is use to declare the name of dataset in DD statement?
DSN is used to declare the name of dataset in a DD statement.
Q 19 - How do we pass values to a program through JCL?
We can pass data to a program either by in-stream data (DD *) or by using PARM parameter.
Q 20 - Which utility is use to compile a COBOL program?
We use IGYCRCTL utility to compile a COBOL program.
Q 21 - Which utility is used to run a COBOL-DB2 program?
IKJEFT01 utility is used to run a COBOL-DB2 program.
Q 22 - What is the output of following JCL?
//STEP1 EXEC PGM = IEBEDIT //SYSUT1 DD DSN = XXXXXX.XXXX.XXXX(XXXXXXXX), DISP = SHR //SYSUT2 DD SYSOUT = (*,INTRDR) //SYSPRINT DD SYSOUT = * //SYSIN DD * EDIT TYPE = INCLUDE, STEPNAME = (STEP3,STEP7) /*
This utility is used to run only particular steps in a JCL.
?* is used to mark the end of in-stream data.
Q 24 - What DISP parameter we mention for creation of temporary dataset so that we can use it in later steps?
PASS is valid only for normal disposition. This is used when the dataset is to be passed and processed by the next job step in a JCL.
Q 25 - Calling a procedure from within a procedure is called a nested procedure. Procedures can be nested up to 15 levels. State whether true or false?
This is self explanatory.
|Question Number||Answer Key|