JCL Realtime (Scenario based) Interview Questions (51 - 55)

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

To execute STEP2 only if STEP1 returns RC=8, use the COND parameter in STEP2.

//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=PROG2,COND=(8,NE,STEP1)

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

To copy data from one dataset to another using SORT, use the OPTION COPY statement.

//STEP1   EXEC PGM=SORT
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DSN=INPUT.DATASET,DISP=SHR
//SORTOUT DD DSN=OUTPUT.DATASET,DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,5),DCB=(RECFM=FB,LRECL=80)
//SYSIN   DD *
  OPTION COPY
/*

53. 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?

True

54. Which utility is used to update PDS?

The IEBUPDTE utility is used to update a Partitioned Data Set (PDS) in JCL.

//STEP1   EXEC PGM=IEBUPDTE
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DISP=SHR,DSN=MY.PDS
//SYSIN    DD *
  ./ CHANGE NAME=MEMBER1
  NEW LINE ADDED TO MEMBER1
/*

55. 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?

True