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.

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?

Answer»

This statement is true.

2.

Which utility is used to update PDS?

Answer»

IEBUPDTE is used to update PDS.

3.

Which utility is used to sort a file in JCL?

Answer»

SORT utility is used to sort a file in a particular order based on the sort card.

4.

A CHKPT is the parameter coded for multi-volume QSAM datasets in a DD statement. When a CHKPT is coded as CHKPT=EOV, a checkpoint is written to the dataset specified in the SYSCKEOV statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

Answer»

This statement is true.

5.

What sort card you will use to copy the data from one dataset to another dataset?

Answer»

In the SORT step mention the SYSIN & SYSOUT dataset name & in sort card code SORT FIELDS=COPY to copy data from input file to output file.

6.

In order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

Answer»

COND=(12,LT,STEP1), it will read the condition as 12 less than 8, which is false, so this step will be executed.

7.

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?

Answer»

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

8.

What DISP parameter we mention for creation of temporary dataset so that we can use it in later steps?

Answer»

DISP = (NEW,PASS). 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.

9.

Which utility is used a dummy utility?

Answer»

IEFBR14 is no operation utility. Used to return control to user and terminate. It is usually used to create empty dataset or delete an existing dataset.

10.

How you will the direct the data to spool using SYSOUT option?

Answer»

Code SYSOUT = *, then the data will be directed to spool.

11.

How you will define a temporary dataset in JCL?

Answer»

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.

12.

What is use of DCB parameter in DD statement?

Answer»

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.

13.

What is use of SPACE parameter in DD statement?

Answer»

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

14.

What is use of DISP parameter in DD statement?

Answer»

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)

15.

What is use of DSN parameter in DD statement?

Answer»

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).

16.

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

Answer»

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

17.

What is the purpose of coding NOTIFY parameter in job statement?

Answer»

The system sends the success or failure message (Maximum Condition Code) to the user specified in this parameter. Syntax − NOTIFY = "userid | &SYSUID"

18.

What is the purpose of coding CLASS parameter in job statement?

Answer»

Based on the time duration and the number of resources required by the job, companies assign different job classes. These can be visualized as individual schedulers used by the OS to receive the jobs. Placing the jobs in the right scheduler will aid in easy execution of the jobs. Some companies have different classes for jobs in test and production environment. Valid values for CLASS parameter are A to Z characters and 0 to 9 numeric (of length 1). Following is the syntax − CLASS=0 to 9 | A to Z

19.

How do you code a Null statement?

Answer»

JCL is terminated by a null statement which is optional. For a null statement code only // starting from column 1. All the lines after this will not be executed.

20.

In Job processing, what happens in Execution stage?

Answer»

When the job reaches its highest priority, it is taken up for execution from the job queue. The JCL is read from the SPOOL, the program is executed and the output is redirected to the corresponding output destination as specified in the JCL.

21.

In Job processing, what happens in Conversion stage?

Answer»

The JCL along with the PROC is converted into an interpreted text to be understood by JES and stored into a dataset, which we call as SPOOL.

22.

What are the various stages of Job processing?

Answer»

Input −> Conversion −> Execution −> Output −> Hard copy −> Purge

23.

Where & how do you code Identifier in JCL?

Answer»

Identifiers are two slashes (//) starting from column number 1. All JCL statements starts with identifiers except for two exceptions - For a delimiter statement, /* starting in col 1 and for a comment statement , //* starting at col 1.

24.

What does MVS stand for?

Answer»

MVS stands for Multiple Virtual storage which is the operating system for the IBM mainframe systems.

25.

What is a JCL?

Answer»

JCL stands for Job Control Language which provides the specifications necessary to process a job. It is a set of control statements which provides the specifications necessary to process a job. It is a interface between programs & MVS operating system.

26.

How can a FB file converted to VB file using SORT program?

Answer»

FTOV option in SORT helps in converting FB to VB file.

//URMIFTOV EXEC PGM = SORT //SORTIN   DD *  123*******  4560000000  123****123  789//SORTOF01 DD DSN = MYDATA.URMI.FILEOUT1, //            DISP = (NEW, CATLG, DELETE),//            RECFM = VB, LRECL = 54//SORTOF02 DD DSN = MYDATA.URMI.FILEOUT2,//            DISP = (NEW, CATLG, DELETE),//            RECFM = VB, LRECL = 54 //SORTOF03 DD DSN = MYDATA.URMI.FILEOUT3, //            DISP = (NEW, CATLG, DELETE),//            RECFM = VB, LRECL = 54 //SYSPRINT DD SYSOUT = * //SYSOUT   DD SYSOUT = * //SYSUDUMP DD SYSOUT = * //SYSIN DD *        SORT FIELDS=COPY   OUTFIL FNAMES = SORTOF01, FTOV, VLTRIM = C'*' //*removes trailing '*'  OUTFIL FNAMES = SORTOF02, FTOV, VLTRIM = X'40'//*removes trailing space  OUTFIL FNAMES = SORTOF03, FTOV, VLTRIM = X'00'//*removes trailing zeros//*
27.

If the submitter of a job wants to inform another user about the job completion, how can it be done?

Answer»

NOTIFY = userid of the person (not the submitter) can be specified in the JOB statement so that the user gets a notification with the return code upon job completion. But the job log is present in the spool under the submitter's userid only.

28.

How can a file of 3n records be split into 3 files each containing n records?

Answer»

STARTREC and ENDREC restricts the READ from the input file on the specified record number.

//URMISPLT EXEC PGM = SORT //SORTIN   DD DSN=MYDATA.URMI.FILEIN,DISP=SHR //SORTOF01 DD DSN = MYDATA.URMI.FILEOUT1, //            DISP = (NEW,CATLG,DELETE),//            RECFM = FB, LRECL = 50 //SORTOF02 DD DSN = MYDATA.URMI.FILEOUT2,//            DISP = (NEW, CATLG, DELETE),//            RECFM = FB, LRECL = 50 //SORTOF03 DD DSN = MYDATA.URMI.FILEOUT3, //            DISP = (NEW, CATLG, DELETE),//            RECFM = FB, LRECL = 50 //SYSPRINT DD SYSOUT = * //SYSOUT   DD SYSOUT = * //SYSUDUMP DD SYSOUT = * //SYSIN DD *        SORT FIELDS = COPY   OUTFIL FILES = 01,ENDREC=100  //*assuming input file has 300 records.  OUTFIL FILES = 02, STARTREC = 101, ENDREC = 200   OUTFIL FILES = 03, STARTREC = 201 //*
29.

A dataset contains 2500 records. How can the last 1500 records copied to an output file?

Answer»

In the SORT/ICETOOL program, SKIPREC = n can be used, which skips the first n records and then copies the rest to the output file.

//JSTEP020 EXEC PGM=ICETOOL                                          //TOOLMSG  DD SYSOUT = *                                               //DFSMSG   DD SYSOUT = *                                               //IN1      DD DSN = MYDATA.URMI.SKIPREC,DISP=SHR    //OUT1   DD SYSOUT = *//TOOLIN   DD *                                                        COPY FROM(IN1) TO(OUT1) USING(CTL1)                                  /*//CTL1CNTL DD *                          SORT FIELDS = COPY  SKIPREC = 1000               /*   
30.

How can a GDG base be created in a JCL. What is the difference between EMPTY and SCRATCH parameter while defining/altering GDG base?

Answer»

GDG base can be created using IDCAMS utility. EMPTY uncataloges all the generations when the LIMIT is reached. SCRATCH physically deletes the generation, when it is uncataloged. (LIMIT specifies the maximum number of versions that the GDG base can hold).

31.

When does a dataset go uncataloged?

Answer»

When it is defined with DISP = (NEW,KEEP) at the time of creation. In case of a GDG, least recent generation is uncataloged if the GDG base had been defined with NOEMPTY parameter when the LIMIT is reached. All generations are uncataloged when coded with EMPTY.

32.

How to do automated RESTART when a job abends?

Answer»

Using RD parameter in JOB/EXEC statement. The abend codes for which RESTART need to be performed can be mentioned in the SCHEDxx member of the IBM system parmlib library.

33.

What are the statements that are not valid to be included in an INCLUDE statement?

Answer»

Dummy DD statements, data card specifications, PROCs, JOB, PROC statements cannot be coded within an INCLUDE member. An INLCUDE statement can be coded within an INCLUDE member and further nesting can be done up to 15 levels.

34.

How do you access an uncataloged dataset in a JCL?

Answer»

By using the UNIT and VOL serial parameters in the dataset DD statement.

35.

How do you create a dataset in a JCL with the same file organisation as that of another existing dataset?

Answer»

Use IEBGENER and pass existing file in SYSUT1. Pass new file in SYSUT2 and mention DCB=*.SYSUT1 to get the same DCB as that of SYSUT1 dataset.

36.

How can the same PROC be re-used and called by many JOBs?

Answer»

The varying portion of the JCL can be specified using symbolic parameters in the JOB and the static parts can be specified in the PROC. For example, if the file name changes for every JOB that uses the PROC, then the varying portion of the file name can be coded in JCL using symbolic parameter.

//IN1 DD DSN = &ID.URMI.IN1, DISP = SHR  //*Coded in PROCID=MYDATA1 is coded in JOB1, ID = MYDATA2 is coded in JOB2 and so on
37.

A JCL has 4 steps and job abends. How to restart the job and run only step 2?

Answer»

Specify RESTART = STEP2 in JOB statement. And include IF-THEN-ELSE construct as below−

//URMIIF JOB 1, CLASS=6, MSGCLASS=0, NOTIFY = &SYSUID,RESTART=STEP2//*//STEP1   EXEC//STEP2   EXEC//IF1     IF (STEP2.RC = 0 & STEP2.RC <> 0) THEN//STEP3      EXEC//STEP4      EXEC//ENDIF