JCL 1
JCL 1
6) How can a job send a status message to a TSO user at the completion of a job ?
(1) STATUS
(2) NOTIFY
(3) ENDMSG
(4) USER
8) When output dataset space is required, what quantity categories are used ?
(1) Primary, Secondary, Directory
(2) Address, Units, CONTIG or ALS
(3) Displacement and length
(4) Megabytes, Kilobytes and Bytes
9) What statement marks the beginning of a job step; assigns a name to the step; identifies the program or
catalogued or in-stream procedure to be executed in the step ?
(1) START
(2) RUN
(3) EXEC
4. GO
10) How can unused space allocation be returned to the system when a dataset is closed ?
(1) RETURN
(2) RLSE
(3) CONTIG
(4) CLOSE
11) Can an individual step be restricted from using all the job’s allowed CPU time ?
(1) Yes
(2) No
(3) Only in Catalogued Procedure
(4) Through the STEPTIME parameter
13) How can the disposition of sysout datasets be set for an entire jobstream ?
(1) SYSOUT parameter
(2) OUTPUT parameter
(3) DEFAULT parameter
(4) DEST keyword
15) What is the function of DD name parameter with a 2 part structure; Audit.Report ?
(1) Override the Audit DD statement in the report
(2) Override the Report DD statement in the Audit procedure
(3) Concatenate a dataset onto a DD statement in a called module
(4) Delete the Audit DD statement in the Report
21) Many JCL statements contain specific values designed to direct & control the execution of the statement.
What are these fields called ?
(1) Linkage Variables
(2) Parameters
(3) Control Libraries
(4) Includes
22) When space is allocated for an output dataset, what units can be used?
(1) Disks
(2) Megabytes
(3) Cylinders, Tracks, Blocks
(4) Bytes
28. How can return codes be tested before execution of a job step?
(1) Through the RC keyword
(2) Through the CODE keyword
(3) Through the COND keyword
(4) Through the RETURNCD keyword
1. How can values be passed from the job stream to an executable program?
(1) Through the PARM keyword
(2) Through the VALUE parameter
(3) Through the PGM parameter
(4) All of the above
4. What parameter of the job statement is used to limit the CPU time consumed by the job?
(1) RUNTIME
(2) TIME
(3) LIMIT
(4 ) EXECMAX
5. What statement marks the beginning of an in-stream or cataloged procedure in JCL and assigns default values
to parameters defined in the procedure
(1) STREAM
(2) SET
(3) PROC
(4) PEND
7. In order to continue a job after a return code of 12 in step1, what the step2 EXEC statement include?
(1) CONTINUE
(2) COND = (12,NE)
(3) COND = (12,GE)
(4) COND = (12,EQ)
9. How can the submitting user’s RACF authority be overridden in a job stream?
(1) Through the USER parameter
(2) Through the USER and PASSWORD parameter
(3) By notifying the console operation to override the authority
(4) Through the RACF parameter
10. What parameters can be used to limit the number of records written to a SYSOUT dataset ?
(1) LIMIT
(2) OUTLIM
(3) SIZE
(4) MAX
11. What statement can be used to send data to another MVS JES3 node ?
(1) LINK
(2) CONNECT
(3) XMIT
(4) SEND
12. What parameter directs the output of the job log dataset ?
(1) JOBLOG
(2) MSGCLASS
(3) MSGLEVEL
(4) SYSLOG
14. How can the attributes of one SMS dataset be copied to another dataset ?
(1) Using DD like parameter
(2) Using DD Copy parameter
(3) Using DD Refer parameter
(4) Attributes cannot be copied within SMS datasets
16. If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the
same job for input?
(1) As the (0) generation
(2) As the (+1) generation
(3) As the (-1) generation
(4) Without the generation number
18. How can a JES3 operator command be entered through the jobstream?
(1) Through the OPERATOR statement
(2) Through the COMMAND statement
(3) Through the //** statement
(4) Through the console statement
19. To connect EBCDIC records to ASCII during write process, what DCB sub-parameter is used ?
(1) EBCDIC = NONE (2) ASCII = ALL (3) TRANSLATE = ALL (4) OPTCODE = Q
20. If a generation data set is specified as input without the generation number, what will the input to the DD ?
(1) the most recent generation created
(2) the earliest generation created
(3) a concatenation of all the cataloged generations
4. a jcl error will be returned to the job
26. If both the JOBCAT & STEPCAT statements are coded in a step, which will be executed?
(1) JOBCAT
(2) STEPCAT
3. the one coded first in the JCL stream
(4) both the statements will be executed in sequence
JCL Interview Questions on Generation Data Group (GDG)
Q: What does parameter MSGLEVEL on the JOB statement mean and what is the advantage of using it.
A: MSGLEVEL indicates whether or not one wishes to print the JCL statements and allocation messages. The
MSGLEVEL parameter can save paper. After a job is debugged, there may be no need to print all the JCL and allocation
messages each time it runs. To reduce printing to a minimum one may wish to code MSGLEVEL = (0,0)
Q: which parameter allows one to run a syntax check n the JCL without executing it?
A: TYPRUN = SCAN parameter is used to check the JCL for syntax errors and suppress the execution of the job. This
checking does not include checking for duplicate datasets on volumes, insufficient space or region size for job steps.
Q: What is the stepname on the EXEC statement used for and is it a required parameter?
A: Stepname on the EXEC statement is used to name the job step. It is required if subsequent JCL statements refer to it
or if one wishes to restart the job from the step; otherwise it is optional. Stepname are recommended and should have
unique names. The names must begin in column 3 with an alphabetic or national character (A-Z, @$#)
Q: What is the default for the TIME parameter if it is not coded on the EXEC statement?
A: If the TIME parameter is omitted from the EXEC statement, the default is 30 minutes of the CPU time.
Q: What can be done to resolve a JCL error that reads ‘DATASET NOT FOUND’?
A: Some of the actions one can take to resolve a JCL error ‘DATASET NOT FOUND’ are:
1. One must examine the job log and the allocation/deallocation report and identify the step and DDname involved.
2. Determine whether or not the dataset name does indeed exist on the system.
3. Check the JCL to make sure the dataset name is spelled correctly.
4. If the job has more than one step and the ABEND is not on the first step, check to see if the dataset on the previous
step was deleted.
5. Fix the problem and resubmit the job.
Q: Parameters COND, REGION, AND TIME can be coded on both the JOB and the EXEC statements. What are the
differences between using them on the JOB versus the EXEC statements, and in which statements are they
commonly used?
A: Parameters COND, REGION, AND TIME coded on the JOB statement will be in effect for the entire job. When used on
the EXEC statement, they will be in effect for that job step only. The COND parameter is normally used on the EXEC
statement. The REGION parameter is not normally used unless a particular program requires a lot of storage and it is
necessary to override the installation’s REGION Default. If the REGION parameter is used on the both JOB
and EXEC statements, then the REGION parameter from the JOB statement will be in effect. The TIME parameter is most
often used on the JOB statement.
1 IEBGENER
• Copy one sequential file to another
• Create datasets with input dataset as DUMMY
2 IEBCOPY
• Copy the partitioned datasets
• Compress the partitioned datasets
• Include members of PDS within a copy transaction
• Exclude members of PDS with in a copy transaction
3 IEHPROGM
• Catalog datasets
• Un-catalog datasets
• Rename the datasets
• Create the index for a generation data groups
• Delete the Index for a generation data groups
4 IEBCOMPR
• Compare two partitioned datasets
• Compare two sequential datasets
5 IEFBR14
• Create a empty dataset
6 IEEPROGM
• Create generation data groups
ABEND CODES
Q: What return code is issued if a job step exceeded the time limit?
A: The system will issue a system code of 322 when a job or job step has exceeded the time limit .If the time parameter
was used on the JOB or EXEC statement. If the time parameter was not used, then it is important to check the program
possible errors.
Q: When the system cannot find enough virtual storage, which system abend is issued?
A: When the system cannot find enough virtual storage during a GETMAIN macroinstruction, it generates a system abend
of 804 or 80A. Check for program errors that incorrectly modify the storage request. If the REGION parameter has been
used, either on the JOB or EXEC statement, it may need to be increased to satisfy the request.
Q: Which system completion code is issued when a program module cannot be found?
A: A system completion code of 806 will be issued when a program module cannot be found. Some of the causes may be
missing the STEPLIB statement from the step or missing the JOBLIB statement from the job stream. Most likely the
program name was misspelled on the EXEC statement or in a source code CALL.
Q: What are some of the abend generated when not enough disk space is available and what do they mean?
A: Some of the abend generated due to a lack of available disk space are:
B37 -- Disk volume out of space, cannot write output. The system gave all the primary space and as much secondary
space as it could.
D37 -- Primary disk space was exceeded and either no secondary space allocation was specified or it was insufficient.
One should increase the primary space as well as provide adequate secondary allocation was specified or it was
insufficient. One should increase the primary space as well as provide adequate secondary space allocation to eliminate
this error.
E37 -- There was insufficient space on the volume. One way to solve this problem is to specify more volumes on the JCL.
Q: Which abend is issued when the system cannot find a member on a portioned dataset?
A: An S013-18 abend occurs when the specified member on the JCL, is not found on the indicated PDS (Partioned
Dataset). Determine if the member is spelled correctly on your JCL. If it is not, then fix member name and resubmit job. If
it is correct, then determine why it is not on the PDS, take the necessary steps to place it on the PDS, and resubmit the
job.
Q: What normally causes an S013-20 abend?
A: An S013-20 is normally caused by the block size not being a multiple of the record length or being incorrect for
variable-length records. Divide your BLKSIZE by the record length to make sure it is a multiple of the BLKSIZE if not,
correct it and resubmit job. For variable-length records, it is necessary to have your BLKSIZE be at least 4 bytes greater
than your record length.
Q: If a job step is in a wait state for 30 minutes or more with no activity, which abend does one receive?
A: If a job step is in a wait for 30 minutes or more with no activity, the job abend with an s522 indicating the time was
exceeded for the wait state. This type of cancellation is unusual and is often caused by a program error or unavailable
datasets / resources.
Q: A system completion code of 813-04 is generated when a dataset name and volume serial number for a tape is
not consistent with the information contained in the tape dataset label. What can be done to fix this problem?
A: When a system completion code of 813-04 is received, one must check the spelling of the dataset name in the JCL and
the volume serial number specified. If possible, dump the dataset label to see the actual dataset name on the tape. Once
the problem has been identified, correct it and resubmit the job.
Q: How many subparameters does the DISP parameter consist of and what is the meaning of each?
A: The DISP parameter consists of three subparameters: start-status, end-status-normal and end-status-abend. Start-
status indicates the status of a dataset at the beginning of the job step. End-status-normal tells MVS what needs to be
done with the dataset when the job step ends. End-status-abend indicates the desired disposition of the dataset if the job
step abend. It is also known as the conditional disposition.
Q: What are the meanings of the parameters used (within) the DISP parameter at the beginning of the job step?
A: The status NEW, MOD, OLD, or SHR is the status of the dataset at the beginning of the step. If the dataset is NEW, the
system creates a dataset label; if it is OLD, the system locates the dataset. The system gives a program exclusive control
of a database except when SHR is used.
Q: What is the default for the disposition parameter if it’s not coded on the DD statement for a dataset?
A: The default disposition used on a dataset, which was coded without a disposition parameter, is NEW. The disposition
of NEW implies exclusive control of the dataset.
Q: What are two different places from which DCB information can be obtained and in what order?
A: Data information can be obtained from three places in the following order:
The data control block, from application program, is used first.
Information supplied on the DD statement is used second.
Dataset label information for the DCB is used third.
Q: Name some of the JCL statements that are not allowed in the procs.
A: Some of the JCL statements that are not allowed in the procs are:
1. JOB Delimiter (/*) or Null (//) statements
2. JOBLIB or JOBCAT DD statements
3. DD * or DATA statements
4. Any JES2 or JES3 control statements
Q: Which type of override parameter requires that one know the parameters that can be overridden?
A: Regular parameters require that one know the parameters that can be overridden, such as step names within the
procedure, the DDnames of the statements overridden, and the order of the DD statements.
Q: What are some of the rules involved in overriding parameters on the EXEC statements in a procedure?
A: To override EXEC parameter one should follow these rules
1. A PGM parameter cannot be overridden.
2. The parameter for each step do not need to be coded in the same order as they appear on the procedure EXEC
statement
3. To add or override a parameter on an EXEC statement, code it as follows parameter.procstepname=value.
4. If a parameter which does not exist is coded on the EXEC statement, the parameter will be added
5. All parameters in each step must be coded in order: the first step must be coded first, second step second, third step
third, etc.
Q: What does a mainframe compiler output in the object deck and what does the linkage editor do with it?
A: The compiler outputs the source code into the object deck in a form to be read by the linkage editor. The linkage editor
combines the object dataset (object deck) from the compiler with machine language code for input/output and other tasks
to create an executable load module.
Q: If a program executed attempts to divide a number by zero, do arithmetic on a field that does not contain
numeric data, or has some other serious logic error, an abend will occur. What is the normal response that MVS
would issue?
A: MVS would issue a “system completion code” that would indicate the nature of the problem, dump the program’s
memory area, and flush the job from the system. The dump may be used for problem analysis. The dump is printed or
stored in a dataset as specified in the //SYSUDUMP DD statement. If //SYSUDUMP is omitted, MVS will provide the
completion code value, but not the dump.
Q What are some of the common linkage editor options and what do they mean?
A: Some of the commonly used linkage editor options are
1. LIST – Lists the linkage editor control statements and is usually specified. Omit the parameter if no linking is declared.
2. MAP – Produces a storage map showing the length and relative locations of all control sections. Default is NOMAP.
3. XREF – Includes MAP plus a cross-reference table of the load module (MAP and XREF are mutually exclusive)
4. NOCALL - Cancels the automatic library call mechanism. NOCALL is used for creating subroutine libraries so that the
load module contains a single subroutine. CALL is the default.
5. LET – Marks load modules as executable even if minor errors are found. NOLET is the default.
6. PRINT – Allows the messages to be written to a SYSOUT DD statement and it is the default. NOPRINT suppresses the
message.
7. AMODE – Specifies whether the program uses 24 or 31- bit addressing. AMODE ANY specifies both 24 and 31 – bit
addressing. AMODE 24 requires the program to run below the 16-meg line. The default is established by the compiler and
is usually AMODE 24.
8. RMODE – Indicates where the program can reside in virtual storage. RMODE ANY allows the program to reside above
the 16-meg line and requires AMODE 31 or AMODE ANY. RMODE 24 requires the program to reside below the 16-meg
line. The default is established by the compiler and is usually RMODE 24.
9. TERM – Causes linkage editor diagnostic message to be written to a SYSTERM DD statement. NOTERM is the
default.
Q: Why would the linkage editor add a member to a load library under the name ‘TEMPNAME’?
A: The linkage editor will add a member to the load library under the name of ‘TEMPNAME’ when a member of the same
name already exist on the library and the disposition on the SYSLMOD statement was coded as DISP = MOD. This
indicates a problem and need s to be resolved.
JCL UTILITIES
Q: What is an IEBGENER used for?
A: IEBGENER is a dataset utility used to copy sequential datasets, produce a partitioned dataset or member from a
sequential dataset, produce an edited sequential or partitioned dataset, and reblock / change the logical record length of a
dataset.
Q: What utility can be both used for VSAM and NON VSAM files?
A: IDCAMS utility is used to handle VSAM and NON VSAM files.
Q: Which utility uses the ‘REPRO’ command and what function does it perform?
A: The utility IDCAMS uses the ‘REPRO’ command. The REPRO command copies sequential datasets. It performs much
the same function as IEBGENER.
Q: When a utility ends with a nonzero return code, what must be done to resolve the problem?
A: When a utility ends with a nonzero return code, it is necessary to determine what caused the error. One may start by
checking for error message generated by the utility and look them upon on a utility messages manual. Also, the JCL
statements and / or control statements should be checked to make sure they were properly coded. Once the error has
been identified, it should be fixed and the job resubmitted.
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: 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 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 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: 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.
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: 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 parameter to be passed in the job card for the unlimited time, irrespective of the job class
A: TIME=1440
Q: How to pass the temp dataset form one JOB step to another?
A: By specifying the DISP as PASS for the temp dataset
Describe the JOB statement, its meaning, syntax and significant keywords.?
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 .
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?
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
What is the meaning of the EXEC statement keyword, COND? What is its syntax?
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!).
What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?
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 .
What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?
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.
What is the meaning of data definition name (DD name) and Data Set name (DSN name) in the DD statement?
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 Data Set name is the operating system (MVS) name for the File.
Q: What are the Maximum number of In-stream procedures you can code in any JCL?
A: 15.
Q: What is JCL
A: It is an interface between operating system (MVS) & the application program. When two related programs are
combined together on control statements, it is called job control language
Q: Is it possible to know the remaining free space in a Control Interval/Control Area once an insertion has been
made
A: No. It is not possible.
Q: What is a GDG?
A: GDG - group of dataset that are logically or chronologically related, referred by name and a relative generation number
- an integer which identifies the generation of a dataset and is coded in parentheses after dataset name. Absolute GDG
name - GxxxxVyy, where xxxx-absolute generation number, yy-version number. GDGs can be sequential, direct,
partitioned. (VSAM - no). They must always be cataloged. Advantages - all datasets have the same name and system
keeps track of adding new and retaining previous generations and deleting oldest successive generation. To create a
GDG we create a GDG index in the system catalog with IDCAMS utility and then a model (prototype, DSCB) on the same
volume to supply DCB information. Empty - when limit is reached all members are removed from the index, otherwise only
oldest. Scratch-removed members are uncataloged & deleted, otherwise - removed & uncataloged, but remain in the
system (not members of GDG any more). GDG number is updated at the end of the job. If number is not specified all
generations will be processed from the beginning
Q: What is the minimum number of Dataset names (PDS) in one Directory Block?
A: SIX
Q: How much is memory space involved, when we code BLOCKSIZE, TRK & CYL
A: One block constitutes 32KB of formatted memory/ 42KB of Unformatted memory; 6 blocks makes one Track & 15
Tracks makes one cylinder.
Q: What is DSNDB06?
A: This is the Place where DB2 Catalog resides;
Q: On a DD statement, what is the main difference between creating a new sequential flat file and a partitioned
dataset?
A: SPACE= (n,m) for a sequential file, SPACE= (n,m,p) for a PDS where n, m, and p are numbers. The p designates how
many directory blocks to allocate.
Q: What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS utility?
A: They are the utility programs used in JCLs: IEBGENER : This utility is used for copying sequential datasets which
produces a PDS or a member from a sequential dataset. IEBCOPY : This utility is used for copying one PDS to another or
to merge PDSs. REPRO : This is for copying sequential datasets. More or less same as the IEBGENER
Q: How many parameters are there to a DISP statement and what are their uses. ?
A: There are three (3) parameters: Parameter 1: Current data set disposition (NEW, SHR,OLD,MOD) Parameter 2:
Normal close action for data set (CATLG, KEEP, DELETE) Parameter 3: Abend action for data set (CATLG, KEEP,
DELETE)
Q: What is COMP?
A: COMP - HALF WORD BINARY
Q: What is a PROCEDURE?
A: A set of precoded JCL that can be modified through the use of parameters or override cards. Note: Procedures can be
catalogued or instream.
Q: What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
A: OLD specifies exclusive use of a dataset, SHR allows multiple jobs to concurrently access the dataset. [Note: When
updating a dataset, you would normally use OLD]
What does the keyword DCB mean and what are some of the keywords ?
associated IT DCB stands for data control block; it is a keyword for the DD statement used to describe Data Sets
Keywords associated with it are BLKSIZE, DEN, LRECL and RECFM.
What are all the JCL statements used in JCL? & What are the JCL statements you have coded so far?
//JOB marks the beginning of a job, contains job information //EXEC marks the beginning of a job step, identifies program,
cataloged procedure to be executed //DD (data definition), identifies a data set and its attributes //OUTPUT (specifies
processing options for system output(sysout) data sets) //(null) (end of job) /* (end of data placed in input stream) //PROC
(procedure) //PEND (procedure end) //* (comment)
What is the difference between the positional parameters & keyword parameters, give examples where they are
used?
Positional Parameters are:- a).Sequence predetermined b) Parameters separated by commas c) Omitted parameters
must be indicated by two consecutive commas. d) Installation dependent EX: //JOBNAME JOB (DIS,
TRG.TRGGLO.NL.BATCH), ‘PGM1) //SETP01 EXEC PGM=MYPROG Keyword parameters are Predetermined words are
referred to as key word Parameters. Any sequence is permitted, separated by commas. Follow positional parameters.
Format is = EX: //JOBNAME JOB (DIS, TRG, N1, BATCH), MSGLEVEL=(1,1), // MSGCLASS=X, NOTIFY=QZ6P03T,
TYPRUN=SCAN
How many characters can be coded for a job name? What were you coding as a job name?
8 Characters, Usually JOBNAME will be like User-id + 1 Char
What is the difference between the Comment statement and the Comments?How they were coded in a JCL?
//* is the comment statement and it starts from column number 1 Anything that is written after 71st column is taken as a
comment.
How will you check the syntax of the JOB without executing it?
Can use JSCAN.Code TYPRUN=SCAN and submit the JCL for syntactical errors.
What are all the parameters needed in a DD statement to create a data set thru JCL? How a Partitioned data set is
created thru JCL?
DISP (Disposition): The DISP parameter describes the status of a data set to the system, what is to be done with the data
set at the end of the job step, and what to do with the data set if the step terminates abnormally DCB (Data control black) :
DCB=(LRECL=NN, BLKZIZE=YY,RECFM=Z,DSORG=MM) Z can be F, FB, V, VB MM Can be PS (physical sequence)
PO (partitioned) DSN (Data set name) : UNIT : Identifies device of data set Space :
How is the Catalog procedure called from a JCL, if it is lying in your own data sets ?
STEP1 EXEC PROC=PROC1 The library in which PROC1 is present should be mentioned in PROCLIB.
What is the difference between the In-stream Procedure & Catalog Procedure?
In-stream Procedures begin with a PROC stmt and must be terminated by a PEND stmt. (PEND can also be coded for a
cataloged Procedure, but it isn’t required) The PENC stmt coded as : //Option-name PEND comments The In-stream
Procedure is placed following the JOB statement of the JOB. Up to 15 In-stream Procedures can be included in a single
job. Each In-stream Procedure may be invoked several times with in the job. //QZ5P13TD JOB (18636), ‘HARISH’,
CLASS=A //RUN PROC In-stream procedure starts from here //GO EXEC PGM=ONE //SYSOUT DD SYSOUT=A //PEND
//STEP1 EXEC RUN procedure is used like .. A set of JCL stmt’s consisting of a PROC stmt and one or more EXEC and
DD stmt (steps), which is placed in a procedure library. It executed by an EXEC (procedure) stmt in another data set
(called the execution JCL). Advantages : Saves time, prevents errors.
Can you explain the DISP Parameter in detail? What are the default DISP Parameters?
a. Current Status NEW – Default OLD – exclusive SHR – Simultaneously MOD – b. Normal Disposition KEEP – Default if
DISP = SHR, OLD, MOD DELETE – Default if DISP = NEW CATLG c. Abnormal Termination – same as Normal
Disposition
What is the difference between the Refer-back & Overriding parameters?How are they coded in a JCL?
Refer back option is a reference to an earlier DD statement in the job or in cataloged or in in-stream procedure called by a
job step. KEYWORD = reference. //JOB1 JOB .. //STEPA EXEC .. //DD1 DD DSN=REPORT ... // DD4 DD DSN=*.DD1
//JOB2 JOB .. //SETP1 EXEC .. //DDA DD DSN=D578.POL.PUBS01 .. //STEP2 EXEC .. //DDB DD DSN=*.STEP1.DDA
Over riding parameters. In an In-stream or Cataloged procedures, the DD names mentioned in the JCL will override the
ones in the procedures. //JOB1 JOB .. //STEPA EXEC PROC1 //PS1.DD1 DD DSN=SAMPLE.PUB,DISP=SHR
//PS2.DD2 DD DSN=SAMPLE.PUB1,DISP=SHR Proc PROC1 contains... //PS1 EXEC PGM=ABC //* //DD1 DD
DSN=DUMMY //SYSOUT DD SYSOUT=* // //PS2 EXEC PGM=DEF //* //DD1 DD
DSN=SAMP.PROG.DATA,DISP=SHR //DD2 DD DSN=SAMP.PROG.DATA1,DISP=SHR // SYSOUT DD SYSOUT=*
What is a GDG?
A GDG is Generation Data Group. GDG’S allow users to create multiple data sets with the same base name distinguished
by a logical number. History files can be referenced by using a negative generation number. GDG base can be created
using a utility (IEBPROGM or IDCAMS) With (+1) we will be creating. EX: //OUTDD DD
DSN=QZ6P03T.ARUN.MASTER(+1) (Create new data set) //INDD DD DSN=QZ6P03T.ARUN.MASTER(+0) (Reference
most current data set). Yes - GDG can be sequential, direct, or partitioned Organization and can be reside on tape or
direct-access volumes GDG must always be cataloged
What are the parameters used in creating a GDG? Explain in detail? Can you alter the parameters for the existing
GDG?If yes, How? Creating a Model Data Set Label (or control block, DSCB)
This label is a data set which contains DCB attributes and is usually referred to in the DCB parameter when creating new
GDG data sets. Most shops create the model DSCB with no DCB attributes.
What for the Model data set used for a GDG? How much space will you give to the Model Data set ?
The system needs an existing data set to serve as a model supplying the DCB parameters for the GDG to you want to
create. The system uses the data set label to obtain the DCB sub-parameters, and the model is called the DSCB for
reasons lost to history. Need not specify any space while creating a model data set.
How many Maximum generations can be created for a GDG?> How will you create a Generation data set ?
The maximum number of GDG versions that can be created is 255. A GDG data set is created with “(+1)” appended to the
name of the GDG base.
What is the E37 error?How will you resolve it with out losing a single byte of data?
(Hint: This Error comes when you save the data set after editing it) Insufficient Space.
2. What is the difference between primary and secondary allocations for a Data Set?
Secondary allocation is done when more space is required than what has already been allocated
3. How many extents are possible for a Sequential File ? For a VSAM File ?
16 extents on a volume for a Sequential File and 123 for a VSAM File
9. What do you do if you do not want to keep all the space allocated to a Data Set?
Specify the parameter RLSE ( release ) in the SPACE. Eg: SPACE=(CYL,(50,50),RLSE)
11. How do you create a temporary Data Set? Where will you use them?
Temporary Data Sets can be created either by not specifying any DSNAME or by specifying the temporary File indicator
as in DSN=&&TEMP We use them to carry the output of one step to another step in the same job The Data Set will not be
retained once the job completes
14. A PROC has five steps Step 3 has a condition code How can you override/nullify this condition code?
Provide the override on the EXEC stmt in the JCL as follows: //STEP001 EXEC procname,CONDstepname=value All
parameters on an EXEC stmt in the proc such as COND, PARM have to be overridden like this
2. What does the TIME parameter signify ? What does TIME=1440 mean ?
TIME parameter can be used to overcome S322 abends for programs that genuinely need more CPU time TIME=1440
means no CPU time limit is to be applied to this step
3. What is COND=EVEN ?
Means execute this step even if any of the previous steps, terminated abnormally
4. What is COND=ONLY ?
Means execute this step only if any of the previous steps, terminated abnormally
8. I have multiple jobs ( JCLs with several JOB cards ) in a member What happens if I submit it?
Multiple jobs are submitted (as many jobs as the number of JOB cards)
9. I have a COBOL program that ACCEPT some input data How do you code the JCL statement for this? ( How do
you code instream data in a JCL?
) //SYSIN DD* input data input data /*
12. How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
To run a non DB2 program, //STEP001 EXEC PGM=MYPROG To run a DB2 program, //STEP001 EXEC
PGM=IKJEFT01 //SYSTSIN DD * DSN SYSTEM() RUN PROGRAM(MYPROG) PLAN() LIB() PARMS() /*
16. When you specify multiple Data Sets in a JOBLIB or STEPLIB, what factor determines the order?
The library with the largest block size should be the first one
18. The DISP in the JCL is MOD and the program opens the File in OUTPUT mode What happens ?
The DISP in the JCL is SHR and the pgm opens the File in EXTEND mode What happens ?
Records will be written to end of File (append) when a WRITE is done in both cases