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 II

Q 1 - Which of the parameters can be coded on both JOB and EXEC?

A - TIME

B - COND

C - ACCT

D - All of these

Answer : D

Explanation

All these parameters can be coded on JOB as well as EXEC. Some other examples are REGION & ADDRSPC

Q 2 - How much time Step2 will have for execution, if Step1 will take 2.5 minutes?

//TXXXXXX JOB (XXXXX), ’XXXX’, TIME = 4
//STEP1 EXEC PGM = PR1, TIME = 4
//STEP2 EXEC PGM = PR2, TIME = 0

A - 4

B - 0

C - 1.5

D - 2.5

Answer : C

Explanation

The job TIME limit takes precedence over the step time limit. Step2 will have 1.5 minutes for execution. If it goes beyond that, this job will abend.

Q 3 - What will happen to Step2 if Step1 executes with RC=0?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = (4, LE, STEP1)

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : B

Explanation

It will read the condition on step2 as 4 Less than 0, which is false, so step will be executed. If condition is true then only the step will be bypassed.

Q 4 - What will happen to Step2 if Step1 executes with RC=0?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = (0, EQ, STEP1)

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : A

Explanation

It will read the condition on step2 as 0 EQUAL 0, which is true, so step will be bypassed. If condition is true then the step will be bypassed.

Q 5 - What will happen to Step2 if Step1 executes with RC=0?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = ONLY

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : A

Explanation

Step2 will be bypassed as we have coded ONLY, which means Step will be executed only if the previous steps abend.

Q 6 - What will happen to Step2 if Step1 abend with some error?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = ONLY

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : B

Explanation

Step2 will be executed as step1 abended and we have coded ONLY parameter which means this step will execute only if the previous steps abend.

Q 7 - What will happen to Step2 if Step1 abend with some error?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = EVEN

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : B

Explanation

Step2 will be executed as we have coded EVEN which means this step will be executed even if all other steps abends or not. If you will code EVEN then step will be executed irrespective of results from other steps.

Q 8 - What will happen to Step2 if Step1 executes with RC=0?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
//STEP2 EXEC PGM = PR2, COND = EVEN

A - Step2 will be bypassed

B - Step2 will be executed

C - None of these

Answer : B

Explanation

Step2 will be executed as we have coded EVEN which means this step will be executed even if all other steps abends or not. If you will code EVEN then step will be executed irrespective of results from other steps.

Q 9 - If COND parameter is coded on both JOB and EXEC statement, then the condition on JOB is checked before checking the condition on EXEC statement. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 10 - A STEPLIB statement is used in order to identify the location of the program to be executed within a Job Step. The STEPLIB statement is specified after the EXEC statement and before the DD statement of the job step. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 11 - A JOBLIB statement is used in order to identify the location of the program to be executed in a JCL. The JOBLIB statement is specified after the JOB statement and before the EXEC statement. This can be used only for the in stream procedures and programs. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 12 - A JCLLIB statement is used to identify the private libraries used in the job. It can be used both with instream and cataloged procedures. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 13 - When the procedure is separated out from the JCL and coded in a different data store, it is called a Cataloged Procedure. A PROC statement is not mandatory to be coded in a cataloged procedure. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 14 - Calling a procedure from within a procedure is called a nested procedure. Procedures can be nested up to 15 levels. The nesting can be completely in-stream or cataloged. We cannot code an in-stream procedure within a cataloged procedure. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 15 - A SET statement is used to define commonly used symbolic across job steps or procedures. It initializes the previous values in the symbolic names. It has to be defined before the first use of the symbolic names in the JCL. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 16 - RESTART parameter is coded in the JOB or EXEC statement and it helps in manual restart of the JOB/STEP after the job failure. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 17 - Temporary datasets need storage only for the job duration and are deleted at job completion. Such datasets are represented as DSN=&name or simply without a DSN specified. State whether true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 18 - Which step will be executed after Step1, if Step1 executes with RC=4?

//TXXXXXX JOB (XXXXX), ’XXXX’
//STEP1 EXEC PGM = PR1
// IF STEP1.RC GT 0 THEN                      
//STEP2 EXEC PGM = PR2
// ELSE
//STEP3 EXEC PGM = PR3
// END-IF

A - Step2 will be executed

B - Step3 will be executed

C - None of these

Answer : A

Explanation

If condition is 4 Greater than 0 and this condition is true, so Step2 will be executed and Step3 will be bypassed.

Q 19 - Which parameter is used to check the syntax of a JCL without executing it?

A - CLASS=0

B - PRTY=N

C - TYPRUN = HOLD

D - TYPRUN=SCAN

Answer : D

Explanation

TYPRUN = SCAN checks the syntax errors of the JCL without executing it.

Q 20 - Which parameter is used to pass information from JCL to a COBOL program?

A - ONLY

B - COND

C - REGION

D - PARM

Answer : D

Explanation

PARM is used to pass the values from JCL to COBOL program.

Answer : D

Explanation

The DSN parameter refers to the physical dataset name of a newly created or existing dataset. The DSN value can be made up of sub-names each of 1 to 8 characters length, separated by periods and of total length of 44 characters (alphanumeric).

Answer : C

Explanation

The DISP parameter is used to describe the status of the dataset, disposition at the end of the job step on normal and abnormal completion. DISP is not required in a DD statement only when the dataset gets created and deleted in the same job step (like the temporary datasets). Syntax : DISP=(status, normal-disposition, abnormal-disposition)

Answer : A

Explanation

The SPACE parameter specifies the space required for the dataset in the DASD (Direct Access Storage Disk). Syntax : SPACE=(spcunits, (pri, sec, dir), RLSE)

Answer : B

Explanation

The Data Control Block (DCB) parameter details the physical characteristics of a dataset. This parameter is required for datasets that are newly created in the job step. LRECL is the length of each record held within the dataset. RECFM is the record format of the dataset.

Answer : D

Explanation

A temporary dataset is the one that is created and deleted within a job and is declared as DSN=&&TEMP. Do not mention the DSN parameters with this.

Answer Sheet

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