JCL interview question 2

JCL Interview Questions

  • What are the various operands that can be coded in a JOB statement?

         Ans:-Time , Msglevel, Msgclass, Notify, Typrun, Region

  • What is the difference between the Positional and Keyword parameters, provide examples of each?

Ans:-

Positional parametersas the name suggests these are the parameters that should  be placed in a specific position within the operand field.

Example:- Accounting information and the programmer name in the Job card are positional parameters at the Job level

Keyword Parametersare not required to be placed in a specific order or position      

Example:- MSGLEVEL=(x,y)                                 

  •  How many characters can be coded for a Job name?

Ans:-  Its eight characters.

  • How to call a Catalog procedure from a JCL?

        Ans:-  Using the  below statement

        EXEC procname

  • How do you give comments in a JCL?

Ans:-  Comments in JCL starts with a //*  in the first column and then followed by user comments.

  • What are all the parameters required in a DD statement to allocate a dataset using JCL?

Ans:-  DD statement, DSN, Disp parameters , unit , volume , Space  

  • What is the purpose of DISP Parameter?  

Ans:-Disp parameter is used to specify the disposition of the dataset i.e. what is the current status of the dataset at the beginning of the step, at successful execution of step and at abnormal execution of the step.

DISP = ( Status , normal disposition , abnormal disposition )

  • What is the difference between the Instream Procedure & Catalog Procedure?

Ans:-   Instream procedure is coded as in stream in the same JCL. Catalog procedure resides in a member in proclib and is called by the JCL.

  • What is the use of Symbolic parameter?  

Ans:-Symbolic Parameter is used to override the values in the PROC without changing the PROC.

  • How to pass data to a program coded in an EXEC statement?

Ans:- We can pass data using any of the following methods

By using the PARM in the JCL and coding the receiving variable in linkage section of COBOL. In this case the “PROCEDURE DIVISION USING” statement will be used.

 By passing data as instream in the JCL and coding an ACCEPT statement in the COBOL.

By passing the data in a flat file and coding file descriptor etc in the COBOL program.

Ans:-DEF GDG (SCRATCH EMPTY LIMIT(02) NAME(gdgname))

  • What are the parameters used in creating a GDG?

; ; ; ;

Ans:-

Name:- Name of the GDG to be created.

Limit(n):-Maximum number of generations that can exist at a time.

Empty:-This option will delete all the older generations if the limit of generations is reached

For Eg:- If a GDG is defined with a limit of 30 and 31st generation is created then all the old 30 generations are deleted and the 31st generation is created.

NoEmpty:- This option will delete the oldest generation if the limit of generations is reached 

For Eg:- If a GDG is defined with a limit of 30 and 31st generation is created then all the first generation will be deleted and the 31st generation will be created. So at the end there will be generations from 2nd to 31st

Scratch:-This option will delete the generation completely if the dataset is deleted.  NoScratch-> This option will uncatalog the dataset if the dataset is deleted.

  • Is it possible to alter the parameters for the existing GDG?  

Ans:-Yes you can alter the parameters for the existing GDG by using the ALTER command

You can provide the new value of parameters in the alter command all in one go or you can alter them individually

For Ex:- If you wish to alter the limit then use the following command

ALTER  gdgname LIMIT(05)

If you wish to alter the limit, scratch/noscratch and empty/noempty options then use the following command

        ALTER  gdgname LIMIT(05) SCRATCH NOEMPTY

  • What is the maximum number of limit that you can provide while creating a GDG base?

       Ans:-255.