InterviewSolution
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:
|
|
| 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-nameAn 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:
|
|
| 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 ProcedurenameHere,
Example 1: //STEP05 EXEC PROC=MTHPROC Or //STEP05 EXEC MTHPROCUse of PROC
Types of procedures |
|
| 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-CLASSBelow are the POSSIBLE values for the JOB-CLASS:
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:
|
|
| 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.
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=ONLYHere, 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=CUST1000Here, |
|