Saturday, May 26, 2012

JCL Interview Questions 1

What is JCL ? 
JCL stands for Job Control Language 
 
What is the difference between keyword and positional parameters ?  
Positional parameters are characterized by their position in the operand field in relation to other parameters.
Keyword parameters are positionally independent with respect to others of their type and consisting of a keyword followed by an equal sign and variable information. 
 
What is a DISP ?
 DISP is a keyword parameter which is defined on the DD statement and which consist of the following positional subparameters: DISP=(Status, Normal Disp, Abnormal Disp). The DISP parameter describes the current status of the dataset (old, new, or modified) and directs the system on the disposition of the data set (pass, keep, catalog, uncatalog, or delete) either at the end of the step or if the step abnormally terminates. DISP is always required unless the data set is created and deleted in the same step.
 
What is DISP=SHR ?
DISP=SHR permits old data sets to be shared. SHR is identical to OLD except that several jobs may read the dataset concurrently in multiprogramming environments. SHR must be used only for input data sets; use OLD or MOD if data set is modified.  Sharing data set is necessary because public libraries like SYS1.LINKLIB or the subroutine libraries should be available to every job in the system.
 
What is DISP=MOD ?
DISP=MOD modifies a sequential data set. It is a convenient way to add data to the end of sequential dataset. If the data set doesn't exist, the system changes MOD to NEW unless the VOL parameter request specific volume. When VOL is coded, the stem expects to find data set on the specified volume and terminates the step if it cannot find it. MOD is the usual way of extended data sets in to several direct-access volumes.
 
What is DISP=PASS ?
 PASS passes the data set on to subsequent job steps, and each step can use the data set once. It is a positional subparameter of the DISP which could only be specified under normal termination action. Pass saves time because the system retains the data set location and volume information.
 
What are the parameters that have to be coded on a DD statement in order to retrieve a cataloged data set ?
 The minimum parameters needed are DSN and DISP.
 
How does the system get information about the block size ?   DCB info comes from :-
1) Program - FD: BLOCK CONTAINS 3 RECORDS RECORD CONTAINS 100 CHARACTERS
2) The label - like a tape
3) From the VTOC - for Dasd
4) From the JCL - DCB=BLKSIZE=nnn.
 
What is a Label ?
 LABEL is a keyword parameter which can be specified on DD statement and consists of the following subparameters:
LABEL=(Relative File #, Type of Label Processing)
The LABEL parameter tells the type of label, the relative file number,and whether the data set is to be protected for input or output.
 
When should be NL be specified as a type of label processing ? 
 NL should be specified when a program needs to process unlabeled tapes NL can also be specified when the pgm wants to create unlabeled tape because the system's default action, in cases when parameter is not specified, will create IBM standard label. Nonlabeled tapes are often used for sending tapes to another installation. That way you don't have to worry about the tape label corresponding to the standards at the other installation or about accidentally matching the volume serial number of an existing tape at the installation.
 
How do you describe the input data which is a part of the input job stream ?  
You should use either DD * or DD Data.
 
What is the difference between * and Data ? 
 DD * and DD DATA describe the input data which follows the above mention cards. If the input data contains record switch // in col 1 and 2 then DD Data should be used. 
 
What is the purpose of SPACE parameter ?
A It is a keyword parameter which should allocated on the DD statement for the output data sets stored on the disk.It consists of the following subparameters:
SPACE=(BLKS/CYL/TRK,(primary,secondary,index),RLSE,CONTIG) 
 
What is a RLSE ?
 RLSE releases all unused space when the data set is closed. It permits you to allocate more space than perhaps, it needed without wasting space. Space is released only if the data set is not empty and if the data set is closed after being opened. 
 
What is a CONTIG ?
 CONTIG requests the primary space be allocated only on contiguous tracks and cylinders, that is all tracks on a cylinder are contiguous, and if more than one cylinder is needed, the cylinders are also contiguous. Always code CONTIG if track overflow is used. 
 
What is a PDS ?
PDS is a library type of data set organization consisting of Directory and Members. The directory consists of blocks, and each block is 256 bytes in length and can hold up to 5 members. Each member of the PDS is a sequential data set.
 
What is a Temporary Data Set ?
 Temporary data sets are used for storage needed only for the duration of the job. If the DISP parameter doesn't delete the data set by the end of the job, the system will delete it. Deleting a tape data set dismounts the tape, whereas deleting a dataset on a direct-access volume release the storage.  A data set is marked temporary by omitting the DSN parameter or by coding DSN=&&dsname. The system assign a unique name to the data set when the DSN parameter is omitted, and any subsequent steps using the dataset refer back to the DD statement.
 
What is COND parameter ?
It is a keyword parameter which can be specified on the JOB or EXEC statements. COND consists of 3 subparameters:
code(0 thru 4095),logical operator, and stepname of the step that is going to be compared.
The purpose of the COND is to determine whether the step should be executed or bypassed. If condition specified in the COND parameter is true,the step is bypassed. 
 
How do you specify a COND parameter for a job step so that the step will never be executed ?  COND=(0,LE) or COND=(4095,GE).
 
What does COND=ONLY mean ?
It means that this job step will be executed only if a previous step had abnormally terminated.
 
What does COND=EVEN mean ?
 It means that this jobs step will be executed even if a previous step abnormally terminated.
 
What is a NAME ?
Name is a positional parameter which identifies the person or group responsible for a job.
 
What is a PRIORITY ?
It is a keyword parameter which specifies a job initiation priority within its job class. When the job is initiated, the system will convert the job's priority into a dispatching priority so that job's task can complete with other tasks for use of main storage and CPU resources.
 
How does the system determine the priority of a job for execution ?
 First the system determines which job has the highest class. Each class has a job queue with jobs of different priorities. The system will select the job for execution that has the highest PRTY (0 thru 15) 15 is the highest priority. 
 
What is a MSGCLASS parameter ?
 It is a keyword parameter which specifies the output class to which system messages for your job are to be routed. Output class is an alphabetic (A thru Z) or numeric (0 thru 9) character. The default for MSGCLASS parameter will be A. System messages and output data sets can be routed to the same output class. You can code the MSGCLASS parameter in the Job statement and the SYSOUT parameter on the DD statement.
 
What is MSGLEVEL parameter ?
It is a keyword parameter which indicates what job output is to be written as a part of output listing. The following outputs can be requested: the Job statement;
all input job control statements;
allocation, disposition and allocation recovery messages(allocation/termination message)
MSGLEVEL=(statements, messages)
Statements:
- 0 - only the job statement is to be written;
- 1 - all input control statements, cataloged procedure statements and the internal representation of procedure statement parameters after symbolic parameters substitution are to be written;
- 2 - only input job control statements are to be written;
Messages:
- 0 - No allocation/termination messages are to be printed unless the job terminates abnormally;
- 1 - All allocation/termination messages are to be printed.
 
How can you check for syntax or JCL errors without actual execution of a job ?
TYPRUN=SCAN should be specified on a job card
 
What is the difference between the COND parameter specified on the EXEC statement and the one specified on the JOB statement ?
COND parameter specified on EXEC statement determines whether step should be bypassed or executed.
COND parameter defined on the JOB statement will determine whether Job should be terminated at a certain point or continued. When COND parameter is defined on the JOB statement, the system evaluates condition specified in the COND parameter before beginning of any job step and compares the code specified in the COND parameter with the return code of all previous jobsteps. If that condition is true, the rest of the job steps are bypassed.

No comments:

Post a Comment