JCL Interview Questions & Answers

  1. Question 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. Question 2. 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)

  3. VSAM Interview Questions

  4. Question 3. Which Utility Is Used To Update Pds?

    Answer :

    IEBUPDTE is used to update PDS.

  5. Question 4. 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.

  6. VSAM Tutorial

  7. Question 5. 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.

  8. IBM – VSAM Interview Questions

  9. Question 6. 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.

  10. Question 7. 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.

  11. IBM-CICS Tutorial
    IBM-CICS Interview Questions

  12. Question 8. 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).

  13. Question 9. Which Statement Is Used To End The In-stream Procedure In A Jcl?

    Answer :

    PEND statement is used to end the in-stream procedure.

  14. IBM DB2 Interview Questions

  15. Question 10. Which Parameter Is Use To Declare The Name Of Dataset In Dd Statement?

    Answer :

    DSN(Dataset Name) is used to declare the name of dataset in a DD statement.

  16. IBM DB2 Tutorial

  17. Question 11. Which Utility Is Used To Run A Cobol-db2 Program?

    Answer :

    IKJEFT01 utility is used to run a COBOL-DB2 program.

  18. COBOL Interview Questions

  19. Question 12. 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.

  20. VSAM Interview Questions

  21. Question 13. 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.

  22. COBOL Tutorial

  23. Question 14. How You Will The Direct The Data To Spool Using Sysout Option?

    Answer :

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

  24. Question 15. 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.

  25. DB2 Using SQL Interview Questions

  26. Question 16. 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.

  27. DB2 Using SQL Tutorial

  28. Question 17. 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)

  29. IBM-JCL&VSAM Interview Questions

  30. Question 18. 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).

  31. IBM – VSAM Interview Questions

  32. Question 19. 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.

  33. IMS/DB Tutorial

  34. Question 20. 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”

  35. IMS/DB Interview Questions

  36. Question 21. 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

  37. Question 22. 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.

  38. Question 23. What Operation Is Performed By Job Statement?

    Answer :

    Specifies the information required for SPOOLing of the job such as job id, priority of execution, user-id to be notified upon completion of the job.

  39. Mainframe DB2 Interview Questions

  40. Question 24. 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.

  41. IBM-CICS Interview Questions

  42. Question 25. 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.

  43. Question 26. What Are The Various Stages Of Job Processing?

    Answer :

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

  44. Question 27. 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.

  45. IBM DB2 Interview Questions

  46. Question 28. What Does Mvs Stand For?

    Answer :

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

  47. Question 29. 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.

  48. Question 30. 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.

  49. Question 31. In A Jcl, A Large Volume Dataset Is Loaded To A Table Using Bmcload In Step1 And An Image Copy Of The Loaded Table Is Taken Using Bmccopy In Step2. Step2 Abends Because The Image Copy Dataset Cannot Hold The Volume Of The Table. How Can This Be Rectified?

    Answer :

    The SPACE parameter of the image copy dataset can be increased based on the volume of the table and the job can be restarted from step2.

  50. Question 32. When Can A Job Time-out Occur? How To Overcome That?

    Answer :

    A job time-out error can occur when the program takes more time than the time limit for the specified class. This is called a S322 abend. This error is encountered when there are some looping errors in the program and it does not reach completion.
    If the data processed in the program is genuinely huge and needs more time than the class limit, then the TIME parameter can be coded as TIME = 1440 to get infinite time until job completion.

  51. Question 33. 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).

  52. COBOL Interview Questions

  53. Question 34. 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.

  54. Question 35. 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.

  55. Question 36. A Jcl Has 2 Steps. How To Code The Jcl Such That If Step1 Abends, Then Step2 Runs. Else, Job Terminates With Step1?

    Answer :

    Code COND = ONLY in STEP2.

  56. DB2 Using SQL Interview Questions

  57. Question 37. 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.

  58. Question 38. How Do You Access An Uncataloged Dataset In A Jcl?

    Answer :

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

  59. Question 39. 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.

  60. Question 40. 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.

  61. IBM-JCL&VSAM Interview Questions

  62. Question 41. What Are The Ways Of Passing Data To A Cobol Program From Jcl?

    Answer :

    Data can be passed to a COBOL program through files, PARM parameter and SYSIN DD statement.

  63. Question 42. How Can You Check If A File Is Empty Using Jcl?

    Answer :

    When the file is used as input in IDCAMS, job completes with a warning (return code 4) if the file is empty.

  64. IMS/DB Interview Questions