Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain DISP=(NEW,PASS,DELETE)?

Answer»

We use DISP=(NEW, PASS, DELETE) to CREATE temporary data sets. DISP NEW allocates space and CREATES a new data SET. Once the current step has been SUCCESSFULLY completed, DISP PASS PASSES the data set to the next step. Once the step abends, DISP DELETE removes the available data set so that only non-abended data sets remain. 

2.

What are different ways in which data can be passed to a COBOL program from JCL?

Answer»

The following methods can be USED to pass data from JCL to COBOL:  

  • SYSIN DD statement: Data can either be PROVIDED directly in SYSIN or as a file. If we want to read that in COBOL, we use the ACCEPT keystroke.
  • PARM parameter: On the JCL EXEC statement, we use PARM='Parameter value' to pass input from JCL to the program. In COBOL, this can be done in the LINKAGE SECTION.
3.

What is the usage of the Include statement in JCL?

Answer»

INCLUDE statements can be used to identify and include a set of JCL statements coded within a member of a PDS (PARTITIONED data set) into a JCL stream. For example, some of the common files used in MANY JCLs can be coded as DD statements within an INCLUDE member and used within the JCL. 

Syntax: 

//name INCLUDE MEMBER=member-name     

An INCLUDE statement cannot contain a dummy DD statement, a data card SPECIFICATION, or JOB, PROC statements. Within an INCLUDE member, an INCLUDE statement may be coded, and nesting may go up to 15 LEVELS

4.

Explain NOTCAT 2- GS.

Answer»

Basically, NOTCAT 2-GS is an MVS (Multiple Virtual STORAGE) message indicating the existence of duplicate catalog data. This would happen, for INSTANCE, if we already had a dataset with DSN = 'xxxx.yyyy' and WANTED to create a new one with DISP new, catlg. In this case, we can correct the situation by deleting the first data SET and cataloguing the new data set on the volume where it resides.

5.

What do you mean by abends in JCL? Write different JCL abend codes.

Answer»

Using the SUBMIT command, the operating system will be informed about the work to be done in JCL. An abend OCCURS when a program terminates abnormally during a step. Some of the JCL Abend codes are listed below:  

  • S0C4: Storage violation error due to a subscript that is out of range.
  • S0C5: This is caused by an invalid address specification, i.e., the address points to a control word, instruction, or data that cannot be cached.
  • S0C7: Bad data causes this error, known as a Data Exception. Whenever we're converting an ALPHANUMERIC field to a numeric COMPUTATIONAL field, we encounter this problem.
  • S222: This error occurs when the OPERATOR cancels a job because the program requests an unavailable resource.
  • S237: This error occurs when the end of the volume is reached.
  • S322: This error occurs when CPU time allocated to a job, job step, or procedure has exceeded the limit, i.e., Timeout error.
  • S522: This error occurs if the waiting state exceeds the installation-defined time limit.
  • SB37: This error occurs when there is insufficient disk space (End of volume with no further volume specified).
  • SD37: This error occurs when there is insufficient disk space (the secondary allocation has not been specified).
  • SE37: This error occurs when there is insufficient disk space (max. 16 extents are currently allocated).
6.

Can you code instream data in PROC.

Answer»

No, it is not possible to use instream DATA inside a PROC. This is a rule. It is usually better to code a few dummy STATEMENTS inside the PROC and OVERRIDE the DD statements from the JCL before executing it.

7.

What do you mean by PROC? State difference between an instream and a catalogued Proc.

Answer»

PROC represents Procedure. A JCL Procedure is a collection of statements within a JCL that perform a particular function. The JCL Procedures work the same way as language compilers and linkage editors across MULTIPLE JCL's. The EXEC statement may be used directly to code the procedure instead of the PROC keyword.

Syntax:   

//Step-name EXEC PROC=ProcedurenameOr //Step-name EXEC Procedurename

Here, 

  • Step-name specifies the ASSIGNED name to step.
  • EXEC specifies the type of JCL statement.
  • PROC specifies Procedure name.

Example 1:

//STEP05  EXEC PROC=MTHPROC Or //STEP05  EXEC MTHPROC

Use of PROC   

  • It ELIMINATES repetitive coding.
  • Code errors are eliminated.
  • Eliminates redundancy.

Types of procedures   

  • In-Stream Procedures: In-stream procedures are those WRITTEN within the same JCL. IDEALLY, it should begin with a PROC statement and end with a PEND statement.
  • Cataloged Procedures: A cataloged procedure is one that is separated from the JCL and coded in a different data store.
8.

Explain the usage of coding class parameters in JCL.

Answer»

In JCL, the CLASS is a keyword parameter that is used to classify the jobs that run in a particular OS installation. CLASS informs the operating system about the nature of the JOB that is being submitted. It prevents contention between jobs that use the same RESOURCE. A parameter like this aids in balancing the LOAD of all the jobs running in an environment. It can also be used to prioritize the execution of jobs. 

Syntax:  

CLASS= JOB-CLASS

Below are the POSSIBLE values for the JOB-CLASS:  

  • Any character from A to Z
  • Any number from 0 to 9

Example: 

//JCL1234 JOB ‘max021’,’Ashish’CLASS=A
9.

Explain utilities in JCL.

Answer»

JCL utilities are pre-written programs that are widely used by system programmers and application developers to meet day-to-day requirements, organize and maintain data. Reorganizing, MODIFYING, or COMPARING data at the record or data set level is done with them. Here are a few of them, along with their functionality: 

  • IDCAMS: Although IDCAMS provides other functions, it is primarily used for defining and managing VSAM data sets and integrated CATALOG facilities catalogs.
  • IEBCOPY: This program COPIES one or more members of an existing dataset onto a new or existing PDS dataset. It also compresses PDS, loads PDS to TAPE, and unloads from TAPE onto DISK.
  • IEBGENER: Often used for copying or printing sequential data sets, it is also a tool for copying TAPE files to DISK and vice versa.
  • IEBUPDTE: This utility can create new members within a partitioned data set, or update records within an existing member. This is mostly used to create or maintain assembler macro libraries and JCL procedure libraries.
  • IEHMOVE: It is typically used to move datasets between volumes.
10.

What do you mean by “Cond=even” and “Cond=only”?

Answer»

CODE-EVEN: By CODING COND=EVEN, the CURRENT job STEP is EXECUTED regardless of whether the previous steps have terminated abnormally. In the CASE of other RC conditions  (return code conditions) being coded alongside COND=EVEN, the job step will execute if none of the RC conditions is true.  

CODE-ONLY: By coding COND=ONLY, the current job step will only be executed when one of the previous steps terminates abnormally. In the case of other RC conditions being coded alongside COND=ONLY, the job step will execute when none of the RC conditions is true and any previous job steps are abnormally failed. 

11.

What happens when COND is coded in JOB statement and EXEC statement?

Answer»

In JCL, a COND parameter can be incorporated into the JOB STATEMENT or EXEC statement. This parameter can be used to skip steps based on return codes from previous steps. Here, we are testing the return code from the previous job steps. In the EVENT that the test is deemed to be true, the current job step execution is bypassed. Bypassing a job step is not an ABNORMAL termination, but simply an omission. 

  • COND is coded in JOB statement: Every step of the job is tested when COND is coded into a JOB statement. At any given job step, if the condition is true, it is bypassed along with the subsequent steps.
  • COND is coded in EXEC statement: In CASE COND is coded in the EXEC statement of a job step and finds to be true, only that job step will be skipped, and execution will continue from the next job step.

Example: 

//MATEKSD JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID, COND=(0,NE)//STEP01 EXEC PGM=CONDPGM1//STEP02 EXEC PGM=CONDPGM2,COND=(0,EQ)//STEP03 EXEC PGM=CONDPGM3,COND=(4,EQ)

Explanation of COND=(0 NE)

As you can see, the COND parameter is set to (0,NE) at the JOB level. In particular, it will check if the return code 0 does not equal the return code of any of the steps in JCL? If this is true, then the job should be terminated. As a result, if any of the steps (such as STEP01, STEP02, or STEP03) returns a non-zero return code, this condition will be true and the job will be terminated.

12.

What do you mean by Condition checking in JCL?

Answer»

Yes, condition CHECKING is possible in JCL, both at the job level and at the STEP level. Obviously, this is done using the COND keyword along with a return code and operand that are DEFINED in JCL. The concept of conditional checking is similar to the concept of (if else) in many programming languages (such as C, C++, Java, ETC.).  

Syntax: 

COND=(RC,OP) COND=(RC,OP,STEPNAME) COND=EVEN COND=ONLY

Here, RC stands for Return code, OP for Operator, and STEPNAME for Step name. 

RC can be assigned any value from 0 to 4095, but in most cases, it will be assigned a value from 0 to 16 as follows:

0 (Successful execution of a program i.e., Normal execution).

4 (Successful execution of a program with some warning).

8 (Error)

12 (Severe Error)

16 (Fatal Error)

‘OP’ can be any one of the following:

EQ (Equal to)

NE (Not Equal to)

LT (Less than)

LE (Less than or Equal to)

GT (Greater than)

GE (Greater than or Equal to)

13.

What is the significance of using the "//" symbol in JCL?

Answer»

It is an important symbol used in JCL statements since EVERY JCL statement must begin with it. JCL statements must satisfy this rule in order to EXECUTE properly. Otherwise, the JCL statement will fail. During JCL execution, the system checks for the symbol (//) at the beginning of each statement. This prevents runtime exceptions. 

Example:

//STEP010 EXEC PGM=MYCOBOL,PARAM=CUST1000

Here, 

  • // is the identifier of the JCL statement.
  • STEP010 is the name assigned to the job step.
  • PGM specifies PROGRAM name.
  • PARAM passes INPUT data to the program.