Thursday, May 3, 2012

JCL-4

Q)      Describe the DD statement, its meaning, syntax and keywords?
A)        The DD statement links the external dataset name (DSN) to the DDNAME coded within the executing program.  It links the file names within the program code to the file names know to the MVS operating system. The syntax is // ddname DD DSN=dataset name.  Other keywords after DSN are DISP, DCB, SPACE, etc.

Q)      What is a PROC? What is the difference between an instream and a catalogued PROC?

A)        PROC stands for procedure.  It is 'canned' JCL invoked by a PROC statement. An instream PROC is presented within the JCL; a catalogued PROC is referenced from a proclib partitioned dataset.

Q)      What is the difference between a symbolic and an override in executing a PROC?

A)        A symbolic is a PROC placeholder; the value for the symbolic is supplied when the PROC is invoked, eg. &symbol=value.  An override replaces the PROC's statement with another one; it substitutes for the entire statement.

Q)      What is RESTART? How is it invoked?
A)        RESTART is a JOB statement keyword. It is used to restart the job at a specified step rather than at the beginning.

Q)      What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?

A)        GDG stands for generation data group.  It is a dataset with versions that can be referenced absolutely or relatively.  It is defined by an IDCAMS define generation datagroup execution.

Q)      Explain concatenating datasets?
A)        Datasets can be grouped in a DD statement one after another, eg. in a JOBLIB statement where the load module can exist in one of many datasets.

Q)      What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

A)        DISP=OLD denotes exclusive control of the dataset; DISP=SHR means there is no exclusivity.

Q)      What is MOD and when would you use it?

A)        DISP=MOD is used when the dataset can be extended, ie, you can add records at the end of an existing dataset.

Q)      What are the keywords associated with DCB?  How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?
A)        The keywords associated with the DCB parameter are LRECL, RECFM, BLKSIZE and DSORG.  The DCB information can be supplied in the DD statement.  The system looks for DCB information in the program code first.

Q)  How do you designate a comment in JCL?

A)        The comment statement is //*  followed by the comments.  

Q)  What is the meaning of the EXEC statement keyword, COND?  What is its syntax?

A)        COND specifies the conditions for executing the subsequent job step.  The value after the COND=  is compared to the return codes of the preceding steps and if the comparison is true, the step is bypassed. (If this answer confuses you, welcome to the club - memorize it and don't ask questions!)

Q)  What is the improvement to COND= in the latest version of MVS?

A)        MVS now allows for an IF bracketed by an END IF around any job step to replace the COND= syntax. Again, if the IF statement is true, the step is bypassed.

Q)  What is the purpose of the PARM keyword in the EXEC statement?

A)        The value after the PARM=  specifies control information to be passed to the executing program of the job step.

Q)  What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?
A)        REGION specifies the maximum CPU memory allocated for a particular job or job step.  If REGION is in the JOB card, it relates to the entire job;  if in the EXEC statement, it relates to the job step.

Q)  What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?
A)        TIME specifies the maximum CPU time allocated for a particular job or job step.  If TIME is in the JOB card, it relates to the entire job;  if in the EXEC statement, it relates to the job step.

Q)  What is the meaning of data definition name (ddname) and dataset name (dsname) in the DD statement?
A)        Data definition name is the eight character designation after the // of the DD statement. It matches the internal name specified in the steps executing program.  In COBOL that's the name specified after the ASSIGN in the SELECT ASSIGN statement. Dataset name is the operating system (MVS) name for the file.

Q)  How is the keyword DUMMY used in JCL?

A)        For an output file DUMMY specifies that the output is to be discarded.  For input it specifies that the file is empty.

Q)  What does the keyword DCB mean and what are some of the keywords associated with it?

A)        DCB stands for data control block; it is a keyword for the DD statement used to describe datasets. Keywords associated with it are BLKSIZE, DEN, LRECL and RECFM.

Q)  What is the difference between BLKSIZE and LRECL?

A)        LRECL is the logical record length , where as BLKSIZE is multiples of LRECL

Q)  Can you execute a PROC from another PROC?
A)        I did not know the answer and my interviewer said NO. Later I tried and executed PROC from a PROC, three levels deep. Manuals do not state any limit on PROC calling PROC, or nesting.

Q)  What will happen if you attempt to restart a job in the middle of a JCL // IF .... // ENDIF?
A)        Job will fall through to the ENDIF (not executing any steps), then resume execution with the first step AFTER the // ENDIF.

Q)  How many positional parameters are there in job statement?
A)        There are two position parameters in job statement.

Q)  What are three parameters you can specify on Job statement as well as on exec stmt ?
A)        Time, Region and Cond parameters

Q)  How can you trap abends in the JCL?
A)        Use IF ABEND statement in the JCL.

Q)  How do you restart a step in JCL?
A)        Use RESTART=step name.

No comments:

Post a Comment