JCL Mock Test



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.

Questions and Answers

JCL Mock Test IV

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                                                    

A - In-stream procedure

B - Catalog procedure

C - Job will abend

D - None of these

Answer : B

Explanation

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

A - TIME parameter inside PROC1 will not be overridden

B - TIME parameter coded in PROCEDURE PROC1 will be replaced with TIME parameter overridden in the JCL i.e TIME = 3

C - It will give abend

D - None of these

Answer : B

Explanation

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

A - A

B - PROG1

C - It will not recognize the value of A

D - None of these

Answer : B

Explanation

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?

A - True

B - False

Answer : B

Explanation

In-stream procedure is coded inside the JCL itself. So this statement is incorrect.

Q 5 - Can a Catalogued procedure call an In-stream procedure?

A - No

B - Yes

Answer : B

Explanation

Yes, a catalog procedure can call a in-stream procedure.

Q 6 - What are the type of procedure in JCL?

A - Cataloged

B - Uncataloged

C - In-stream

D - Both A & D

Answer : D

Explanation

Catalog and in-stream procedures are used in JCL.

Q 7 - Which method you will use to skip a particular step in JCL?

A - SKIP

B - COND

C - ASKIP

D - None

Answer : B

Explanation

You can use COND with the step. If condition is true step will be bypassed.

Q 8 - Which statement is coded in the starting of a procedure?

A - PEND

B - PROC

C - SET

D - START

Answer : B

Explanation

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?

A - COND=(12,GT,STEP1)

B - COND=(12,LT,STEP1)

C - COND=(8,EQ,STEP1)

D - RESTART

Answer : B

Explanation

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?

A - 20

B - 15

C - 25

D - 12

Answer : B

Explanation

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?

A - As (+2) generation

B - As (+0) generation

C - As (+1) generation

D - As (-2) generation

Answer : C

Explanation

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?

A - As (-1) generation

B - As (+1) generation

C - As (+0) generation

D - As (-2) generation

Answer : C

Explanation

To refer the last generation of a GDG, we use the reference as (+0).

Q 13 - What prefix character we use for symbolic parameter?

A - %

B - @

C - &

D - $

Answer : C

Explanation

We use & for symbolic parameters.

Q 14 - Which parameters we use in a JOB statement?

A - Positional

B - Keyword

C - In-Stream

D - Both A & B

Answer : D

Explanation

We use positional and keyword parameters in a job statement.

Q 15 - How to send the execution status of a job to a user?

A - STATUS

B - MESSAGE

C - NOTIFY

D - ALERT

Answer : C

Explanation

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?

A - STOP

B - END

C - PEND

D - None of these

Answer : C

Explanation

PEND statement is used to end the in-stream procedure.

Q 17 - What units are used for allocation of output dataset?

A - KB

B - Bytes

C - Cylinders, Tracks & Blocks

D - MB

Answer : C

Explanation

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?

A - DS

B - NAME

C - DSN

D - MARK

Answer : C

Explanation

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?

A - In-stream data

B - PARM

C - Both A & B

D - Not possible

Answer : C

Explanation

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?

A - IKJEFT02

B - IKJEFT01

C - IGYCRCTL

D - None of these

Answer : C

Explanation

We use IGYCRCTL utility to compile a COBOL program.

Q 21 - Which utility is used to run a COBOL-DB2 program?

A - IKJEFT02

B - IKJEFT01

C - IGYCRCTL

D - None of these

Answer : B

Explanation

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)                        
/* 

A - It will execute only STEP1

B - It will exclude STEP3 & STEP4 from execution

C - It will execute only STEP3 & STEP4

D - None of these

Answer : C

Explanation

This utility is used to run only particular steps in a JCL.

Q 23 - How to mark the end of in-stream data?

A - END

B - //*

C - /*

D - PEND

Answer : C

Explanation

?* 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?

A - DISP=(NEW,CATLG,DLTE)

B - DISP=(NEW,DLTE)

C - DISP=(NEW,PASS)

D - DISP=(NEW,CTLG)

Answer : C

Explanation

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?

A - False

B - True

Answer : B

Explanation

This is self explanatory.

Answer Sheet

Question Number Answer Key
1 B
2 B
3 B
4 B
5 B
6 D
7 B
8 B
9 B
10 B
11 C
12 C
13 C
14 D
15 C
16 C
17 C
18 C
19 C
20 C
21 B
22 C
23 C
24 C
25 B
jcl_questions_answers.htm
Advertisements