Friday, April 13, 2012

JCL-1

Q. What are the kinds of job control statements?
A. The JOB, EXEC and DD statement.

Q. What is the meaning of keyword in JCL? What is its opposite?
A. A keyword in a JCL statement may appear in different places and is recognized by its name, eg. MSGCLASS in the JOB statement. The opposite is positional words, where their meaning is based on their position in the statement, eg. in the DISP keyword the =(NEW,CATLG,DELETE) meanings are based on first, second and third position.

Q. Describe the JOB statement, its meaning, syntax and significant keywords?
A. The JOB statement is the first in a JCL stream. Its format is // jobname, keyword JOB, accounting information in brackets and keywords, MSGCLASS, MSGLEVEL, NOTIFIY, CLASS, etc.

Q. Describe the EXEC statement, its meaning, syntax and keywords.
A. The EXEC statement identifies the program to be executed via a PGM=program name keyword. Its format is //jobname EXEC PGM=program name. The PARM= keyword can be used to pass external values to the executing program.

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 sysem 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. BLKSIZE specifies the number of bytes 

No comments:

Post a Comment