0% found this document useful (0 votes)
151 views51 pages

JCL Faqs: JCL Questions Amit Sethi Page 1 of 51

JCL (Job Control Language) is used to communicate between programs and the operating system. It consists of control statements that provide specifications for running jobs, such as I/O resource requirements. The main JCL statements are JOB, EXEC, and DD. A JOB statement begins a job and provides job-level parameters. An EXEC statement follows the JOB statement and names the program to execute along with any step-level parameters. DD statements define files and allocate I/O devices. Key parameters include CLASS, MSGCLASS, REGION, and TIME. TYPRUN=SCAN allows checking for syntax errors without running the job.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views51 pages

JCL Faqs: JCL Questions Amit Sethi Page 1 of 51

JCL (Job Control Language) is used to communicate between programs and the operating system. It consists of control statements that provide specifications for running jobs, such as I/O resource requirements. The main JCL statements are JOB, EXEC, and DD. A JOB statement begins a job and provides job-level parameters. An EXEC statement follows the JOB statement and names the program to execute along with any step-level parameters. DD statements define files and allocate I/O devices. Key parameters include CLASS, MSGCLASS, REGION, and TIME. TYPRUN=SCAN allows checking for syntax errors without running the job.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 51

JCL FAQS

JCL Questions Amit Sethi Page 1 of 51


1. What is JCL?
JCL stands for Job Control Language. It is a means of communication
between a program written in COBOL, Assembler or PL1 and MVS
operating system.
JCL consists of control statements that introduces a computer job to an
OS. JCL contains a set of statements referred to as Program control
cards, provides necessary specifications such I/O resource requirements
to process a Job. JCL is used for submitting batch jobs. JCL is not a
procedural language like COBOL and is also not used to write Programs.

2. Briefly describe the Format of JCL statement.


//name operation operand comment
Name field identifies the statement. It should be of a maximum of 8
characters long, should start from 3rd column, The first character must be
an alphabet.
Operation field specifies the type of statement, viz. JOB - makes the
beginning of the JOB, or EXEC - follows JOB statement, and names the
Program / Procedure to be executed, or DD - defines the file and
requests the allocation of I/O devices. PROC begins a catalogued or
instreamed procedures, while PEND marks the end of in-stream
procedure. JCLLIB/STEPLIB specifies the private libraries containing the
catalogued procedures and JCL referred to by Include statements. SET
assigns values to symbolic parameters in catalog procedures, INCLUDE
allows JCL stored in partitioned dataset to be included in the job stream.
IF/THEN/ELSE/END allows selective execution of Job steps. CNTL and
ENDCNTL marks the start and end of control statements in the input
stream. OUTPUT Supplies options for SYSOUT processing. /* indicates
the end of data. //* marks as comment line. // Marks the end of Job.
Operand field supplies information to JCL in the form of parameters
(positional and key-word).
Positional parameters are characterized by their position in relation to
other parameters. The Key-word parameters are independent of their
position and characterized by key-word and '='.
Key-word and positional parameters may have sub-parameters enclosed
in parenthesis that may be positional or key-word parameters, following
their corresponding rules.
The various parameters are separated by Commas, The absence of
positional parameters are indicated by coding a coma in it's place.
Comma's need be provided, if all subsequent positional parameters are
absent. The enclosing parameters can be omitted, if there is only one
value.
Nothing needs to be coded if all positional parameters are absent. Key
word parameters can be coded in any order after any positional
parameters. Comments field is optional.

JCL Questions Amit Sethi Page 2 of 51


3. What are the components of JCL Statements?

All JCL statements can consists of up to five types of fields as stated


below

Identifier field: The two forward slashes (//) are required to identify each
JCL statement.

Name field: Optional field, if coded must immediately follow //.

Operation field: which indicates operation that is to be performed

Operand field: This field must appear one or more spaces after the
operation field. Multiple operands in one statement are separated from
each other via commas.

Comments: can be specified one space after the last operand in any JCL
statement. Can be identified by means of //*

4. What are the 3 types of statements in JCL?


JOB Statement, Exec Statement and DD statement.

5. What are the general rules in coding a JCL?


Start all statements in column 1 with appropriate // or /* or space. An
entry in the name field must begin in column 3 and be followed by atleast
one space. There must not be any embedded blanks within fields,
parameters must be separated by commas. Column 1 to 71 contains the
JCL information. Use '-' for continuation. Comments may be written on
comment line or by leaving a blank after all the operands.

6. JOB Statement and its Parameters What are the various parameters
that are generally coded on JOB statement?
Following are some of the parameters that are used on JOB statements.

Account, Name, Class, Region, COND, MSGCLASS, MSGLEVEL, TYPRUN,


PRTY and Region etc. Out of these Account, Name parameters are
Positional parameters and are mandatory and remaining are key word
parameters.

7. Explain JOB statement.


Jobname, (acctnum,acctname) (positional parms),'Name' (positional
parm), CLASS= , PRTY= , MSGCLASS= , MSGLEVEL= , TYPRUN= ,
NOTIFY= . CLASS and MSGCLASS can have one of the 36 values, A-Z
and 0-9. Class depends on the amount of CPU time required and use of
tapes by the job. MSGCLASS specifies the job scheduler message output

JCL Questions Amit Sethi Page 3 of 51


class. TYPRUN can be SCAN or HOLD. PRTY is used to specify the priority
of the job, smaller number indicates higher priority (allowed values are
0-15 for JES2 and 0-14 for JES3). MSGLEVEL have two positional
parameters stmts, mesgs; Stmts of '0' indicates print only Job
statements, '2'-print all JCL and JES statements and Messages, '3'-only
JCL & JES statements print; Mesgs of '0' only JCL messages print; if the
job ABENDs, then JES messages too, '1'- JCL and JES messages print.
NOTIFY is used to notify the user about the completion of Job.

8. Can comments be started at any column in JCL statement?


Yes, they can be started after last operand in a JCL statement.

9. 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.

10. How many positional Parameters are there in a JOB statement?


There are TWO position parameters in a JOB statement.

11. What does CLASS parameter specifies?


Job Class identifies the nature of the job that is to be submitted. Some
jobs can be short running, others can take a long time, still others may
utilize heavy resources. The job class is used to identify these
characteristics to the operating system.

12. What is the significance of TYPRUN parameter in JCL?


If TYPRUN=SCAN is coded, it checks job for syntactical errors.
If TYPRUN=HOLD is coded, holds the Job without running. This job can
be run only after operator releases the Job.

13. What is the use PRTY parameter?


The PRTY parameter is related to the CLASS parameter. It assigns
priority to jobs, which belong to same class.

14. What is the significance of Region Parameter on Job Card


To override the installation default Region size for executing your job,
Region parameter will be used. REGION=0M parameter again allocates
maximum space that is available in the system to execute the job.

JCL Questions Amit Sethi Page 4 of 51


15. What is the parameter to be passed in the job card for the
unlimited time, irrespective of the job class
TIME=1440

16. 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.

17. 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.

18. 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 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.

19. 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.

JCL Questions Amit Sethi Page 5 of 51


20. How can you check for syntax or JCL errors without actual
execution of a job?
TYPRUN=SCAN should be specified on a job card

21. How do you Restart a step in JCL?


Using the RESTART=step name command in the Job statement you can
restart the job from a particular step.

EXEC Statement and its Parameters

22. Explain EXEC statement with the various parameters used.


The PGM parameter specifies the Program to be executed. ACCT
parameter is used to specify the accounting number of the Step, if it is
different from the Job accounting number. PARM is used to send values
to the program, when it is executed. REGION specifies the amount of
storage a Job step can use. DPRTY is used to specify priority to the step.
COND specifies the condition for executing subsequent Job step. TIME
sets a CPU time limit for a Job step. Ex. //step1 exec
pgm=prog1,parm='aa',region=64k

23. How many Job steps are possible in a single Job?


Upto 255 Job steps are possible in a single Job.

24. How do you pass parameters to the program as the job is being
executed?
By using ‘PARM’ parameter in the EXEC statement or through sysin
statement.

25. What are three parameters you can specify on Job statement as
well as on exec stmt ?
Time, Region and Cond parameters
should be declared in linkage section in the program.

26. What is the significance of TIME parameter?


Time parameter is used to specify the amount of CPU time that a job or
job step is permitted to use before it terminates. TIME parameter can be
specified both on JOB and EXEC statements. The Time parameter
specified in EXEC statement will override the TIME parameter specified
on the JOB statement.

DD Statement and its Parameters

27. What are the DD statements used for Peripheral I/O devices?

JCL Questions Amit Sethi Page 6 of 51


For Input stream datasets SYSIN is traditionally used as ddname. Use
SYSOUT parameter to indicate the Output stream dataset.

28. Explain the DD statement.


ddname - specifies the name of the DD statement. DSN= is used to
specify the dataset name to OS, &&name is used to specify a temporary
dataset. DISP=(status, norm, abnorm) is used to specify the Disposition
of the DS, with the status at beginning and norm, abend after execution,
valid options are new, old, shr, mod for status, keep, catalog, uncatalog,
delete for normal & abnormal run's, In addition Pass is also used for
normal run. UNIT specifies the I/O devices. VOL, SPACE and DCB are
others.

29. What is the Maximum number of DD statements allowed in a JCL?


Max of 3273.

30. What is importance of DSN parameter RECFM=FBA?


The Dataset is Fixed Blocked, 1st column in the dataset is used for printer
control, i.e to print the line in the next page, next line or 2 lines after.

31. What is the significance of UNIT parameter ?


UNIT parameter is used along with a DD statement. It conveys
information input or output devices that will be used by the job.

32. What is the use of VOL parameter for dataset?


The volume parameter is used to identify the volume serial number of
the device on which a given dataset is to be written or on which a dataset
resides. The Vol parameter can be used both for disk and tape datasets.

33. What is the significance of Undefined Length ?


RECFM=U subparameter results in the operating system allowing records
of undefined length to be created for the dataset specified. Eg: Load
module dataset.

34. What is the significance of BUFNO parameter?


The BUFNO parameter is used to specify the number of buffers to be
allocated to virtual storage for the dataset. A large number buffers can
improve I/O performance.

35. What is the use of DUMMY parameter ?


The dummy parameter is coded on DD statement to test the execution of
a program without actually reading or writing to a dataset.

JCL Questions Amit Sethi Page 7 of 51


36. 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.

37. 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.

38. 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.

39. 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.

40. How do you describe the input data which is a part of the input
job stream?
You should use either DD * or DD Data.

41. 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.

42. What is the purpose of SPACE parameter?


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
sub-parameters:
SPACE=(BLKS/CYL/TRK,(primary, secondary, index),RLSE,CONTIG)

JCL Questions Amit Sethi Page 8 of 51


43. 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.

44. 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.

45. What is the significance of OUTLIM parameter?


The OUTLIM parameter is coded on the DD statement and is used to limit
the number of lines that are output to the destination specified in the
sysout.

46. 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.

47. How do you read input that is mentioned in the sysin card of JCL
through COBOL program?
Using ACCEPT Statement

48. What is the DD name, where all your DISPLAY statements will be
routed?
SYSOUT

Conditions

49. What for COND parameter used for?


The COND parameter is used to control the execution of subsequent job
steps, depending on the condition code that is returned for a prior step.
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.

The COND parameter coded on the JOB statement applies to all job steps
within that job, and it overrides the COND parameters coded on the EXEC
statement.

JCL Questions Amit Sethi Page 9 of 51


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.

50. What is a COND parameter in JCL?


COND means condition parameter, consists of 2 sub-parameters, 1st -
return code from the previous step, 2nd - condition.. It is compared with
system return code of previous step. //step1 exec pgm=abcd //step2
exec pgm=xyz, cond=(4,lt). Step2 will be executed only if system return
code of step1 is less than 4, else it is bypassed.

51. 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.

52. 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.

53. 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).

54. What does COND=ONLY mean?


It means that this job step will be executed only if a previous step had
abnormally terminated.

55. 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?

JCL Questions Amit Sethi Page 10 of 51


Name is a positional parameter which identifies the person or group
responsible for a job.

56. 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.

Procedures-Cataloged/Instream

57. What is meant by Procedure ? What are different types of


procedures?
The Procedure helps to minimize duplication of code. A procedure is
initiated with the keyword PROC.

There are two types of procedures in JCL. They are called instream
procedure and catalogued procedure.

58. What is meant by Instream Procedure?


The procedure that is included in the input stream of job is called
Instream procedure. They start with PROC statement and end with PEND
statement.

59. Explain Cataloged Procedures.


A set of job control statements that are grouped together, given a name
and then recorded as a member of partitioned dataset.
The JCL statements that have potential use by several users are often
placed in a cataloged procedure, which can be invoked by a single exec
statement. They are stored in a PDS (need to be specified by JCLLIB
ORDER=(dsn,dsn,...) statement) or SYS1.PROCLIB system library. It
begins with PROC statement and followed by JCL statements that
constitute the procedure.

60. Explain In-stream Procedure.


In-stream procedure starts with a PROC statement and end with PEND
statement. In-stream procedure's can be included after the JOB
statement but before the first EXEC statement. Up to 15 in-stream

JCL Questions Amit Sethi Page 11 of 51


procedures are allowed in a JOB, with each in-stream procedure allowed
to be executed several times.

61. What is the difference between catalogue procedure and In-


Stream procedure?
In Stream procedures are set of JCL statements written between JOB and
EXEC statements, start with PROC and end with PEND statement. Mainly
used to test catalogue procedures. Cataloged procedure is cataloged on
the procedure library and is called by specifying the procedure name on
the EXEC statement.

62. Explain Symbolic Parameters.


Symbolic parameters are used to override parameters on the DD
statement.
To run a procedure for various jobs, we may have the need to modify the
DD statements every time in the procedure, for that we can use Symbolic
parameters which provides the means to modify procedures for
execution. Symbolic parameters are preceded with ampersand (&) and
may be 1 to 7 alphanumeric characters long, which must be coded in the
operand field of JCL statements. Key words on EXEC statement such as
COND, PARM, PGM cannot be coded as symbolic parameter names.
Values can be assigned to EXEC or SET statement on the PROC
statement for duration of the run.

63. How do you assign values to Symbolic parameters?


Values can be assigned to symbolic parameters on PROC, EXEC and SET
statements of a JCL. Values containing special characters other than
blank , . ' * must be coded in apostrophes ''. Values assigned to symbolic
parameters can be of any length but cant be continued on next line.
Symbolic parameters can be concatenated with other symbolic
parameters. Nullify the symbolic parameter value by coding the key word
followed equal sign without a value, either on PROC or EXEC statement.
Delimiter such as leading or trailing commas next to Symbolic
parameters are not removed.

64. How do you restart a proc from a particular step?


In job card, specify RESTART=procstep.stepname. where procstep =
name of the JCL step that invoked the procedure and stepname = name
of the procedure step where you want execution to start

65. How do you skip a particular step in a proc/JOB?


Can use either condition codes or use the jcl control statement IF (only in
ESA JCL)

JCL Questions Amit Sethi Page 12 of 51


66. 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, COND.stepname = value
All parameters on an EXEC stmt in the proc such as COND, PARM have to be
overridden like this.

67. How do you override a specific DDNAME/SYSIN in PROC from a


JCL?
//<stepname.dd> DSN=...

68. Explain the SET command.


A SET statement is used to assign values to symbolic parameters. Any
number of SET statements can be included in a JCL. SET can be placed in
a catalog procedure to assign default values rather than to assign values
on the PROC statement. SET can be placed in JOBSTREAM to assign
default values rather than assign values on EXEC statement. A new SET
statement can change the value of previous SET statement. A value of
SET by PROC statement is changed, if a SET statement appears with in
the procedure. SET statement can be placed anywhere following the Job
statement. SET is conditional and is not affected by condition execution
of the IF-THEN-ELSE-ENDIF. SET statement can replace setting symbolic
parameter values on both EXEC and PROC statement, they also allow to
create symbolic values in JCL and assign them without having to create a
cataloged or in-stream procedures.

69. Explain Nesting Procedure.


In-stream procedures can be nested to a maximum of 15 levels (i.e. one
proc invoking other and so on). We can not make backward reference
between nested procedure. Up to only one over ridding statement is
possible. All step-names should be unique So that we can override them
correctly.

70. Explain Include statement.


It is used to copy in JCL stored as a member of a PDS using the JCLLIB
statement to name the PDS and placing INCLUDE statements in the JCL,
where we want the members to be copied. //INCLUDE
MEMBER=member-name . PDS must be named with JCLLIB statement.
PDS must be cataloged and have DCB attributes of LRECL=80 and
RECFM=F or FB. It can be place anywhere after JOB statement. Placed in
Cataloged and In-stream procedures. Include group can be nested up to
15 levels. Include can not Contain JOB, PROC/PEND, JCLLIB, DD *, JES2
& JES3 statements.

JCL Questions Amit Sethi Page 13 of 51


71. Can you code in-stream data in a PROC? How do you overcome if
there are limitations?
No. One way is to code SYSIN DD DUMMY in PROC, and then override it
in JCL with in-stream data.

Data Set Allocations

72. What is primary allocation for a dataset?


The space allocated when the dataset is first created.

73. What is the difference between primary and secondary


allocations for a dataset?
Secondary allocation is done when more space is required than what has
already been allocated.

74. 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.

75. On the DD statement, what is the main difference between


creating a new sequential flat file and PDS?
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 for a PDS.

76. How much is memory space involved, when we code


BLOCKSIZE,TRK & CYL
One block constitutes 32KB of formatted memory/ 42KB of Unformatted
memory, 6 blocks makes one Track & 15 Tracks makes one cylinder.

77. What 3 guidelines do we have to follow when concatenating DD


statements?
1) Datasets must be of the same type (disk or tape). 2) All datasets must
have the same logical record length. 3) The dataset with the largest
block-size must be listed first.

78. What is the minimum number of dataset names (PDS) in one


Directory Block?
SIX

79. What is the maximum number of Steps allowed in a JOB?


255

JCL Questions Amit Sethi Page 14 of 51


80. How much space does OS allocate, when you create a PS or PDS?
56 KB

Dispositions

81. How many parameters are there to a DISP statement and what
are their uses?
There are three(3) parameters. Parameter 1: current data set
disposition(new, shr, old, mod). 2: normal close action for data set
(catlg, keep, delete) Parameter 3:abend action for data set (catlg, keep,
delete).

82. 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.

83. 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.

84. 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.

85. 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
for the specific job.

JCL Questions Amit Sethi Page 15 of 51


86. How to pass the temp dataset form one JOB step to another?
By specifying the DISP as PASS for the temp dataset

87. How do you mention Temporary datasets in JCL ? Do the


temporary dataset exists after the completion of job ?
Using && (double ampersand). The dataset does not exist after
completion of job.

88. What does a disposition of (NEW,CATLG,DELETE) mean?


That this is a new dataset and needs to be allocated, to CATLG the
dataset if the step is successful and to delete the dataset if the step
abends.

89. What does a disposition of (NEW,CATLG,KEEP) mean?


That this is a new dataset and needs to be allocated, to CATLG the
dataset if the step is successful and to KEEP but not CATLG the dataset if
the step abends. Thus if the step abends, the dataset would not be
catalogued and we would need to supply the vol. ser the next time we
refer to it.

90. How do you access a file that had a disposition of KEEP?


Need to supply volume serial no. VOL=SER=xxxx.

91. What does a disposition of (MOD,DELETE,DELETE) mean ?


The MOD will cause the dataset to be created (if it does not exist), and
then the two DELETE 's will cause the dataset to be deleted whether the
step abends or not. This disposition is used to clear out a dataset at the
beginning of a job.

92. What is the DD statement for a output file?


Unless allocated earlier, will have the following parameters:
DISP=(NEW,CATLG,DELETE), UNIT , SPACE & DCB .

93. What do you do if you do not want to keep all the space allocated
to a dataset?
Specify the parameter RLSE ( release ) in the SPACE e.g. SPACE=(CYL,
(50,50),RLSE)

94. What is DISP=(NEW,PASS,DELETE)?


This is a new file and create it, if the step terminates normally, pass it to
the subsequent steps and if step abends, delete it. This dataset will not
exist beyond the JCL.

JCL Questions Amit Sethi Page 16 of 51


95. How do you create a temporary dataset? Where will you use
them?
Temporary datasets 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
dataset will not be retained once the job completes.

96. What is NOTCAT 2


This is an MVS message indicating that a duplicate catalog entry exists.
E.g., if you already have a dataset with dsn = 'xxxx.yyyy' and u try to
create one with disp=new,catlg, you would get this error. The program
open and write would go through and at the end of the step the system
would try to put it in the system catalog. At this point since an entry
already exists the catlg would fail and give this message. You can fix the
problem by deleting/uncataloging the first dataset and going to the
volume where the new dataset exists (this info is in msglog of job) and
cataloging.

97. 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.

Libraries- JOB/STEP/PROC Libs

98. HOW MANY TYPES OF LIBRARIES ARE THERE IN JCL ?


Libraries are of three types.1.Sytem libraries: such as sys1.linklib.
2.Private libraries: specified in a Joblib or Steplib DD statements. 3.
Temporary Libraries: Created in a previous step of the job.

99. What is STEPLIB, JOBLIB? What is it used for?


Specifies that the private library (or libraries) specified should be
searched before the default system libraries in order to locate a program
to be executed. STEPLIB applies only to the particular step, JOBLIB to all
steps in the job.

100. What is order of searching of the libraries in a JCL?


First any private libraries as specified in the STEPLIB or JOBLIB, then the
system libraries such as SYS1.LINKLIB. The system libraries are specified
in the linklist.

101. What happens if both JOBLIB & STEPLIB is specified ?


STEPLIB will be given first priority and then JOBLIB is ignored.

JCL Questions Amit Sethi Page 17 of 51


102. When you specify multiple datasets in a JOBLIB or STEPLIB, what
factor determines the order?
The library with the largest block size should be the first one.

103. How to change default proclib ?


//ABCD JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB)

104. What is the significance of JOBLIB and STEPLIB statements?


To specify the location of the program that is specified in the EXEC
statement, both JOBLIB and STEPLIB statements will be used. JOBLIB
belongs to all the steps in the Job and should be immediately followed by
job statement. Where as STEPLIB is available to the particular step only.
STEPLIB has got higher priority over JOBLIB.

105. What is the purpose of include statement in a JCL?


It is used as an alternative for steplib. When we specify the dataset name
in include ,it will search in all the datasets specified in the include
dataset.

ABENDs

106. What is 'S0C7' abend? What is a S0C4 error ?


S0C7 is Caused by invalid data in a numeric field. S0C4 is a Storage
violation error - can be due to various reasons. e.g.: READING a file that
is not open, invalid address referenced due to subscript error.

107. What are SD37, SB37, SE37 abends?


All indicate dataset out of space. SD37 - no secondary allocation was
specified. SB37 - end of vol. and no further volumes specified. SE37 -
Max. of 16 extents already allocated.

108. What is S322 abend ?


Indicates a time out abend. Your program has taken more CPU time than
the default limit for the job class. Could indicate an infinite loop.

109. What is COND=EVEN ? What is COND=ONLY ?


COND=EVEN Means execute this step even if any of the previous steps,
terminated abnormally.
COND=ONLY Means execute this step only if any of the previous steps,
terminated abnormally.

110. How can you trap abends in the JCL?

JCL Questions Amit Sethi Page 18 of 51


Use IF ABEND statement in the JCL.

111. How do you restart a step in JCL?


Use RESTART=step name.

Utiliies

112. What does IEBGENER do?


Used to copy one QSAM file to another. Source dataset should be
described using SYSUT1 ddname. Destination dataset should be
described using SYSUT2. IEBGENR can also do some reformatting of data
by supplying control cards via SYSIN.

113. What is a Dummy Utility and what it does ?


IEFBR14 is a Dummy utility and it is used for the sake of EXEC PGM= ....
statement in JCL[when used it wouldn't perform any task]. e.g. While
Allocating a dataset you don't have to run any utility [this could be done
by giving disp=new in DD statement]. But for a PGM name must be given
in EXEC statement, it is used.

114. Comparision between IEBGENER and IEBCOPY?


IEBGENER is used to copy one sequential data set to another dataset.
Where as IEBCOPY is used to copy members of a Partitioned dataset, to
load tape data sets to direct access devices and to compress datasets.

115. What is the difference between IEBGENER, IEBCOPY and REPRO


in IDCAMS utility?
IEBGENER -- This is a dataset utility for copying sequential datasets.
IEBCOPY -- This is a dataset utility for copying one PDS to another or to
merge PDSs.
REPRO -- This is IDCAMS Utility pgm used to copy, Reorg datasets. Can
be used for QSAM datasets also

116. What is meant by INCLUDE statement in SORT step?


The Include statement is coded in the sort program to select only
specified records, which meet the specified criteria.

JCL Questions Amit Sethi Page 19 of 51


JCL and COBOL/CICS

117. How do you submit a JCL under CICS environment ?


Pass all the JCL codes to a COBOL variable (should be declare using
OCCURS clause) and the write the line one by one to the spool using
CICS commands like SPOOLClose SPOOLOpen SPOOLWrite . For more
help refer it CECI of CICS or CICS manual.

118. How to execute a set of JCL statements from a COBOL program?


Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command. var-
name is a COBOL host structure containing JCL statements.

119. How do you submit JCL via a Cobol program?


In your JCL define as//JOBA JOB 1111,JOB1//STEP01 EXEC
PGM=PROG1//ddname DD SYSOUT=(*,INTRDR)....and your
COBOL(PROG1) should look like this SELECT JCL-FILE ASSIGN TO
ddname. Open this file and write the JCL statements into this file.
Example. MOVE '//TESTJOB JOB 1111,VISVEISH' TO JCL-REC. MOVE
'//STEP01 EXEC PGM=IEFBR14' TO JCL-REC. and close this file. Then
TEST JOB will be submitted.

120. I have a COBOL program that ACCEPT 's some input data. How do
you code the JCL statement for this? (How do you code in-stream
data in a JCL?)
//SYSIN DD*
input data
/*

121. How do you send the output of a COBOL program to a member of


a PDS?
Code the DSN as PDS(member) with a DISP of SHR. The disp applies to
the PDS and not to a specific member.

GDGs

122. Explain GDG?


Generation Data Group is a group of datasets that are logically or
chronologically related and referred by a name and 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 gen.number, yy-version number. Can be
sequential, direct, partitioned. (VSAM - no). Must always be cataloged.

JCL Questions Amit Sethi Page 20 of 51


Advantage - 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.

123. How do you refer a current(or latest) GDG dataset in the JCL ?
Using Dataset name (0)

124. How do you mention in the JCL, when you want to create a new
GDG data set ? How do you refer the same dataset in the next
step?
Using dataset name (+1) , Dataset name(+1) only.
The catalogue information of GDG will not be updated until the
completion of job.

125. Which Utility program is used to create GDG base ?


IDCAMS, Define statement is used to create GDG base

126. Do all versions of the GDG have to be of the same record length ?
No, the DCB of the model dataset can be overridden when you allocate
new versions.

127. How are different versions of GDG named ?


Base-file-name.GnnnnV00 where nnnn= generation number (upto 255). nnnn will be
0000 for the 1st generation.

128. Suppose 3 generations of a GDG exist. How would you reference


the 1 st generation in the JCL?
Use GDG name(-2).

129. Suppose a generation of GDG gets created in a particular step of a


proc. How would you refer the current generation in a subsequent
step? What would be the disposition of this generation now?
Relative generation numbers are updated only at the end of the job, not at the end
of a step. To allocate a new generation, we would be using (+1) with a DISP of
(NEW,CATLG,DELETE). To refer to this in a subsequent step in the same job, we
would again use (+1) but with a DISP of SHR or OLD.

JCL Questions Amit Sethi Page 21 of 51


130. Can we browse or edit the GDG dataset if it is a tape entry?
No.

Misc

131. For how long a job can be executed continuously in a Mainframe


248 Days.

132. How do you submit JCL via a Cobol program?


Use a file //dd1 DD sysout=(*,intrdr)write your JCL to this file. Please
some one try this out.

133. What is the difference between static call & Dynamic call?
In the case of Static call, the called program is a stand alone program, it
is an executable program . During run time we can call it in our called
program. As about Dynamic call , the called program is not an executable
program it can executed thru the called program

134. I have multiple jobs ( JCL 's 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).

135. How do you run a COBOL batch program from a JCL? How do you
run a COBOL/DB2 program?
To run a non DB2 COBOL program:
//STEP001 EXEC PGM=MYPROG
To run a DB2 COBOL program:
//STEP001 EXEC PGM=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(....)
RUN PROGRAM(MYPROG)
PLAN(.....) LIB(....) PARMS(...)
/*

136. What are the valid DSORG values?


PS - QSAM, PO - Partitioned, IS - ISAM

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

JCL Questions Amit Sethi Page 22 of 51


138. What are the maximum and minimum sizes of any CONTROL AREA
(VSAM datasets) ?
Minimum Size : 1 track Maximum size : 1 cylinder

139. How do you pass parameters to the programs the job is being
executed ?
By using 'PARM' parameter in EXEC statement. The values mentioned
here should be declared in linkage section in the program and process
through Procedure division. This technique is very useful when you do
not know the parameters at the time of coding the programs.

140. Why do you use a control card?


A control card can be a member of a PDS or a Sequential Dataset and is
used for storing the date fields, Definitions of VSAM files....etc. You use
control-card because you cannot use a in-stream procedure in a
procedure. Generally you will be calling a Proc from your Jcl and you
cannot code in-stream procedure in the Proc and so you will point to the
dataset, which is called control-card.

141. Write a JCL to execute a Job by 7 a.m. on JAN 20,1986 ?


THE code IS : //*MAIN DEADLINE=(0700,B,012086)

142. What you mean by skeleton JCL?


Jcl which changes during run time i.e. the values for the JCL such as Pgm
name ,DD name will change .i.e. same JCL can be used for various jobs,
equivalent to dynamic SQL ...

143. What is the max block-size for a Tape file?


It is 32,760.Based on that we can calculate efficient number of Records
in a Block

144. Is it possible to know the remaining free space in control


interval/control area, once an insertion is made.
You can find using LISTCAT command

145. What is the difference between primary and secondary


allocations for a dataset?
Secondary allocation is done when more space is required than what has
already been allocated.

JCL Questions Amit Sethi Page 23 of 51


146. What is meant by SUM FIELDS = None in the Sort Utility ?
Duplicate records will be eliminated

147. How will you pass data to a batch program from JCL.
Either using PARM parameter or through SYSIN statement.

148. How will you start a JCL when some of the steps already executed
are to be by passed ?
Using RESTART parameter in the JOB statement.

149. How you will by pass one step, depending on the Return code of
the previous step. How will you by pass more than one step in a
JCL?
Using COND coded on the particular step.
Using COND coded on the JOB statement.

150. Did you use IF and END-IF in JCL?


Yes. These are called modal commands.

151. If for a existing Batch program Compilation JCL abends at


compilation step. Did it cause any problem if we run the program
with the existing load module?
No, Old load module is used for execution.

152. How would you limit the time allotted for a job to forty-five
seconds?
With a TIME Parm on the JOB statement in the form: TIME=(, 45).

153. What will make this step run if COND parm is COND=(0,NE)?
Run if return codes from any previous step(s) were equal to zero. Skip
this step if the return code from any previous steps is not equal to zero
(0,NE).

154. What is LASTCC and MAXCC ?


LASTCC implies the resultant code resulted from the last step.
MAXCC implies the max return code resulted from all the previous steps.

155. How do you change LASTCC and MAXCC values in the JCL?
Using SET command like SET MAXCC = 8.

JCL Questions Amit Sethi Page 24 of 51


156. How do you specify the DD card in JCL when you want to read
records from VSAM file based on alternate index in the COBOL
program?
You need to mention in the JCL base cluster and Path for the alternate
index.

Eg

In the cobol program the input-output section is coded as below and file
accessed using VSAM file.

SELECT ALT-VSAM FILE assign to ALTMSTR

Then JCL should be coded as followed

//ALTMSTR DD DSN=TEST.MASTER.CLUSTOR, DISP=SHR


//ALTMSTR1 DD DSN=TEST.MSTR.ALTPATH, DISP=SHR

157. Explain Job Entry System. What are the differences between JES2
& JES3 ?
JES is used to accept jobs and run them on one of several computers
connected together in a network. JES consists of statements placed
before or after the JOB statement to direct Jobs to the computer in a
network. (i) In JES2 computers are connected in a network, and each
computer is termed as a node. In JES3 several computers are connected
closely together and all of the scheduling is done by a single computer
that is called a global processor. (ii) In JES2 each computer in a network
can select jobs from it's queue (decentralized system), while in JES3 the
global processor schedules the jobs in queue to itself or to the other
computers connected to it (centralized system). (iii) JES3 allocates
datasets for all the steps before the job is scheduled. In JES2, allocation
of datasets required by a step are done only just before the step
executes. (iv) All the jobs are placed in single Job Queue in JES2 & JES3.
They can also route the output to some destination. JES2 statements can
not be placed in a cataloged Procedure.

JCL Questions Amit Sethi Page 25 of 51


1. What is primary allocation for a dataset?

The space allocated when the dataset is first created.

2. What is the difference between primary and secondary allocations


for a dataset?

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.

4. What does a disposition of (NEW,CATLG,DELETE) mean? - GS

That this is a new dataset and needs to be allocated, to CATLG the dataset if
the step
is successful and to delete the dataset if the step abends.

5. What does a disposition of (NEW,CATLG,KEEP) mean? - GS

That this is a new dataset and needs to be allocated, to CATLG the dataset if
the step
is successful and to KEEP but not CATLG the dataset if the step abends.
Thus if the
step abends, the dataset would not be catalogued and we would need to
supply the vol.
ser the next time we refer to it.

6. How do you access a file that had a disposition of KEEP? - GS

Need to supply volume serial no. VOL=SER=xxxx.MOD,DELETE

7. What does a disposition of (,DELETE) mean ?

The MOD will cause the dataset to be created (if it does not exist), and then
the two
DELETEs will cause the dataset to be deleted whether the step abends or
not. This
disposition is used to clear out a dataset at the beginning of a job.

8. What is the DD statement for a output file?

Unless allocated earlier, will have the foll parameters:


DISP=(NEW,CATLG,DELETE), UNIT , SPACE & DCB .

JCL Questions Amit Sethi Page 26 of 51


9. What do you do if you do not want to keep all the space allocated
to a dataset?

Specify the parameter RLSE ( release ) in the SPACE e.g.


SPACE=(CYL,(50,50),RLSE)

10. What is DISP=(NEW,PASS,DELETE)?

This is a new file and create it, if the step terminates normally, pass it to the
subsequent
steps and if step abends, delete it. This dataset will not exist beyond the
JCL.

11. How do you create a temporary dataset? Where will you use
them?

Temporary datasets 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
dataset will not be retained once the job completes.

12. How do you restart a proc from a particular step? - GS

In job card, specify RESTART=procstep.stepname


where procstep = name of the jcl step that invoked the proc
and stepname = name of the proc step where you want execution to start

13. How do you skip a particular step in a proc/JOB? - GS

Can use either condition codes or use the jcl control statement IF (only in
ESA JCL)

14. A PROC has five steps. Step 3 has a condition code. How can
you override/nullify this condition code? - GS

Provide the override on the EXEC stmt in the JCL as follows:


//STEP001 EXEC procname,COND.stepname=value
All parameters on an EXEC stmt in the proc such as COND, PARM have to be
overridden like this.

15. .How do you override a specific DDNAME/SYSIN in PROC from


a JCL?

//<stepname.dd> DSN=...

16. What is NOTCAT 2 - GS

JCL Questions Amit Sethi Page 27 of 51


This is an MVS message indicating that a duplicate catalog entry exists. E.g.,
if you
already have a dataset with dsn = 'xxxx.yyyy' and u try to create one with
disp
new,catlg, you would get this error. the program open and write would go
through
and at the end of the step the system would try to put it in the system
catalog. at this
point since an entry already exists the catlg would fail and give this
message. you can
fix the problem by deleting/uncataloging the first data set and going to the
volume
where the new dataset exists(this info is in the msglog of the job) and
cataloging it.

17. What is 'S0C7' abend? - GS

Caused by invalid data in a numeric field.

18. What is a S0C4 error ? - GS

Storage violation error - can be due to various reasons. e.g.: READING a file
that is
not open, invalid address referenced due to subscript error.

19. What are SD37, SB37, SE37 abends?

All indicate dataset out of space. SD37 - no secondary allocation was


specified. SB37 –
end of vol. and no further volumes specified. SE37 - Max. of 16 extents
already
allocated.

20. What is S322 abend ?

Indicates a time out abend. Your program has taken more CPU time than the
default
limit for the job class. Could indicate an infinite loop.

21. Why do you want to specify the REGION parameter in a JCL


step? - GS

To override the REGION defined at the JOB card level.


REGION specifies the max region size. REGION=0K or 0M or omitting
REGION
means no limit will be applied.

22. What does the TIME parameter signify ? What does TIME=1440
mean ?

JCL Questions Amit Sethi Page 28 of 51


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.

23. What is COND=EVEN ?

Means execute this step even if any of the previous steps, terminated
abnormally.

24. What is COND=ONLY ?

Means execute this step only if any of the previous steps, terminated
abnormally.

25. How do you check the syntax of a JCL without running it?

TYPERUN=SCAN on the JOB card or use JSCAN.

26. What does IEBGENER do?

Used to copy one QSAM file to another. Source dataset should be described
using
SYSUT1 ddname. Destination dataset should be decribed using SYSUT2.
IEBGENR
can also do some reformatting of data by supplying control cards via SYSIN.

27. How do you send the output of a COBOL program to a member


of a PDS?

Code the DSN as pds(member) with a DISP of SHR. The disp applies to the
pds and
not to a specific member.

28. 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).

29. I have a COBOL program that ACCEPTs some input data. How
do you code the JCL statment for this? ( How do you code instream
data in a JCL? )

//SYSIN DD*
input data
input data
/*

30. Can you code instream data in a PROC ?

JCL Questions Amit Sethi Page 29 of 51


No.

31. How do you overcome this limitation ?

One way is to code SYSIN DD DUMMY in the PROC, and then override this
from the JCL with instream data.

32. 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(...)
/*

33. What is STEPLIB, JOBLIB? What is it used for? - GS

Specifies that the private library (or libraries) specified should be searched
before the
default system libraries in order to locate a program to be executed.

STEPLIB applies only to the particular step, JOBLIB to all steps in the job.

34. What is order of searching of the libraries in a JCL? - GS

First any private libraries as specified in the STEPLIB or JOBLIB, then the
system
libraries such as SYS1.LINKLIB. The system libraries are specified in the
linklist.

35. What happens if both JOBLIB & STEPLIB is specified ?

JOBLIB is ignored.

36. When you specify mutiple datasets in a JOBLIB or STEPLIB,


what factor determines the order? - GS

The library with the largest block size should be the first one.

37. How to change default proclib ?

//ABCD JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB)

JCL Questions Amit Sethi Page 30 of 51


38. 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.

39. What are the valid DSORG values ?

PS - QSAM, PO - Partitioned, IS - ISAM

40. What are the differences between JES2 & JES3 ?

JES3 allocates datasets for all the steps before the job is scheduled. In JES2,
allocation of datasets required by a step are done only just before the step
executes.

1Q. If a region parameter is specified in both the job card and the step card, which one does
the system use ?
1A. The job card overrides the step card.

2Q. If multiple COND parameters are specified on a step, is the relationship between the
parameters a logical “AND” or a logical “OR” ?
2A. A logical “OR” - at least the condition specified must be true to bypass the step.

3Q. What is an instream procedure ?


3A. An instream procedure is in the same dataset as the body of the JCL and is delimited by
the PROC and PEND statements.

4Q. How can you specify instream data ?


4A. DD * or DD DATA

5Q. What do the three subparameters of DISP signify ?


5A. Status, Normal disposition, Abnormal disposition

6Q. When creating a dataset, how do you tell the system to free up unused space when the
dataset is closed ?
6A. Specify RLSE.

7Q. If the first subparameter in the DISP parameter is not coded what will be the default
?
7A. The first subparameter defaults to NEW.

8Q. What are three types of JCL statements ?


8A. JOB
EXEC

JCL Questions Amit Sethi Page 31 of 51


DD

9Q. What is the purpose of the COND parameter in the EXEC statement ?
9A. To conditionally control the execution of a job step based on the outcome of a prior job
step. The parameter is compared with the actual return code and if the compare is true,
processing terminates.

10Q. What does “COND = ONLY” indicate ?


10A. Execute only when an Abend occurs. Used primarily for recovery.

11Q. What is a symbolic parameter ?


11A. A symbolic parameter is a symbol preceded by an ampersand that stands for a parameter,
a subparameter or a value.

12Q. How are symbolics used in JCL ?


12A. They are coded in a procedure and assigned a value in the job steps that execute the
procedure. A default can be coded in the procedure, it will be used if a value is not
assigned in the job step. Any parameter, subparameter or value in a procedure that can
vary each time the procedure is executed, is a good candidate for definition as a symbolic
parameter.

13Q. What is a GDG ?


13A. Generation Data Group.

14Q. What IBM utility is used to create a GDG ?


14A. IDCAMS.

15Q. What else can IDCAMS be used for ?


15A. LISTCAT - List dataset information
PRINT - Print contents of datasets
REPRO - Copy records from one file to another
DELETE - Delete datasets/catalog entries.

16Q. What is IEFBR14 utility used for ?


16A. It is a utility that can allocate or delete datasets, establish return codes for conditional
processing.

17Q. What are the major DCB parameters in the DD statement ?


17A. RECFM
LRECL
BLKSIZE

18Q. What is a DD (data definition) statement ?


18A. A DD statement describes a dataset and requests the allocation of I/O devices.

19Q. When would you need to use a GDG ?


19A. A GDG should be used when you need to run a job repeatedly and retain the output from
each execution without changing the name of the output file.

20Q. How is the JOBLIB card used ?

JCL Questions Amit Sethi Page 32 of 51


20A. It comes right after the JOB card and defines a program library to be used.

21Q. How do you name a temporary dataset ?


21A. &&filename

22Q. How do you perform step restart ?


22A. Specify “RESTART=“ in the JOB statement.

23Q. Can you place an instream PROC anywhere within the body of the JCL ?
23A. No. The PROC must precede the first EXEC statement of the JCL.

24Q. Can you specify instream data in a cataloged procedure ?


24A. No.

25Q. What does DISP=MOD specify ?


25A. To append to the end of a sequential dataset.

26Q. How do you specify a new generation of GDG ?


26A. +1.

27Q. When overriding DD names within a PROC, what must be specified ?


27A. STEPNAME.DDNAME

28Q. How do you define an instream PROC ?


28A. The first statement is PROC and the last statement is PEND.

29Q. If a Ddname is in the JCL but not in the program, what will happen at execution
time?
29A. Nothing.

30Q. What is “DD DUMMY” used for ?


30A. It is used to nullify an input or an output dataset. When used the system returns an
immediate end of file condition.

31Q. When does a +1 GDG revert to zero ?


31A. At the end of the job.

32Q. Can you override the “PGM=“ parameter in an EXEC statement ?


32A. Only if the program name is a symbolic in a PROC, but normally no.

33Q. What does “COND = EVEN” indicate ?


33A. Execute even when an Abend occurs in the previous step.

34Q. What is the difference between SYSUDUMP and SYSABEND ?


34A. SYSUDUMP gives you only a core dump. SYSABEND gives you a core dump and a
dump of the system nucleus.

35Q. How do you prevent dismounting of a tape until end of job ?


35A. Specify RETAIN on the VOL parameter.

36Q. What is the maximum number of characters in a PARM statement ?

JCL Questions Amit Sethi Page 33 of 51


36A. 100 characters.

37Q. How is a read performed if you specify “RECFM=U,BLKSIZE=1500” ?


37A. Block by block.

38Q. If the TYPE parameter is omitted from the LABEL parameter of a tape, what
type of labels are assumed ?
38A. Standard labels.

39Q. What is the parameter TYPRUN used for ?


39A. This parameter is used to perform certain functions with a job. For instance HOLD -
holds the job prior to execution, SCAN - scans the JCL for syntax errors but execution
does not occur.

40Q. What is the purpose of a SYSOUT parameter ?


40A. It is used to specify a dataset as a system output dataset. Specifies the queue the output is
to be directed to, and what special form , if any, is to be used.

41Q. Define a JCL statement format in general terms.


41A. All JCL statements (except for the end of file statement) begin with a // in columns 1 and
2 , followed by a name, operand and comments field.

42Q. What does a // statement represent ?


42A. End of file statement for marking the end of data that is included with the JCL statements.

43Q. What does a // statement represent ?


43A. A null statement , used to mark the end-of-file.

44Q. How are comments coded in JCL ?


44A. //* in columns 1 thru 3 indicate a comment statement. A comment field must be
seperated from an operand field by at least one blank and only coded if there is an
operand field.

45Q. What is a cancatenated data set ?


45A. A group of input data sets that are treated as one data set for the duration of a job step.

46Q. How are data sets concatenated ?


46A. Write a normal DD statement for a data set then add a DD statement without the dd name
for each data set to be concatenated.

47Q. What is temporary data set ?


47A. A new data set that is created and deleted in the same job.

48Q. How does the system know that a data set is temporary ?
48A. && in DSN

49Q. What is the difference between a dd name and a ds name ?


49A. A dd name stands for data definition name. It is the name given to a DD statement and it
forms the connection between the program and the data set.

JCL Questions Amit Sethi Page 34 of 51


A ds name stands for the data set name. It is the name that the operation uses to locate a
particular data set.

50Q. What does the DUMMY parameter tell the system ?


50A. The processing program should not perform any input/output operation on the data set
coded with DUMMY.

51Q. What does the DCB stand for ?


51A. Data Control Block.

52Q. Name the sub-parameters on the DCB.


52A. BLKSIZE, LRECL, RECFM, DSORG, KEYLEN and RPK

53Q. What is the general form of the DISP parameter ?


53A. DISP = (beginning status, normal disposition, abnormal disposition)

54Q. What is the DISP parameter equal to on a temporary data set ?


54A. PASS

55Q. If no disposition is coded for a temporary data set, when is the data set deleted ?
55A. At the end-of-job.

56Q. Name three JOB stsatement keyword parameters.


56A. CLASS, MSGCLASS, MSGLEVEL, REGION, TIME, RESTART and COND

57Q. Name three keyword parameters of a DD statement.


57A. DIV, SPACE, UNIT, VOLUME, DISP, DCB and DSN

58Q. What is the JOBLIB ?


58A. A special DD name that when used on a DD statement , indicates to the system that a
private library is being used.

59Q. What is the difference between a JOBLIB and a STEPLIB statement ?


59A. The JOBLIB dictates the sequence that libraries are searched when looking for an
executable module for the entire JOB execution.
The STEPLIB controls the library search sequence for each step that the STEPLIB
appears in.

60Q. What is the maximum number of times the secondary space allocation will be
attempted ?
60A. 15

61Q. What is a generation data set ?


61A. A collection of successive, historically related, catalouged data sets.

62Q. If you have a job that creates the next (or new) generation of a data set, what is the value
assigned to the DSN ?
62A. +1

JCL Questions Amit Sethi Page 35 of 51


63Q. What is the maximum number of generation data sets you can have ?
63A. 255

64Q. What is caused by coding 1440 or 1439 in the JOB parameter ?


64A. The job has no time limit.

65Q. What does COND=ONLY denote ?


65A. Execute the job step only if the previous steps terminate abnormally.

66Q. What is IEFBR14 most commonly used for.


66A. To allocate and delete files.

67Q. How many types of procs are there ?


67A. 2 - Cataloged and Instream

68Q. Have you ever executed a proc from within a proc ?


68A. No. Can not be done.

69Q. What is the purpose of the JOBCAT DD ?


69A. To append the VSAM user catalog to the VSAM master catalog.

70Q. What kind of file cannot be assigned to DD DUMMY ?


70A. Sequential input - VSAM or Sequential output - GDG.

71Q. What are the requirements to run an instream procedure ?


71A. The procedure begins with a proc statement and is terminated with a pend statement. The
instream procedure is placed after the job statement and before the first ecec statement of
the job.

72Q. How are symbolic parameters identified and how are they used ?
72A. Symbolic parameters begin with an ampersand (&). They provide an alternative method
of modifying parameters on the DD statement.

73Q. What is the function of UNIT = AFF = ddname


73A. Assigns data sets on mountable volumes to the same unit used by another data set.
The ddname must be the name of a previous statement in the same step.

74Q. What does VOL=(SYSDA,8) indicate ?


74A. An eight volume DASD data set mounted in paralell.

75Q. What does VOL=(,,,8) indicate ?


75A. A tape data set that can expand to a maximum of 8 volumes (tapes).

76Q. What is the function of VOL=(,RETAIN) ?


76A. It keeps a (tape) mounted between job steps.

77Q. How do you code a DD statement to prevent a tape data set from being mounted until the
program opens the data set ?

JCL Questions Amit Sethi Page 36 of 51


77A. UNIT = ( TAPE,,DEFER).

78Q. For what purpose are RETPD and EXPDT used, and how do they differ ?
78A. They are used to assign retention periods to data sets. Retpd assigns a specific number of
days from 0 to 9,999. Expdt assigns a year and a day from 001 to 366 within the year.

79Q. What causes an OC7 abend ?


79A. Invalid data in a numeric field.

80Q. A system 0013 abend is an error during the execution of an open macro. What are the
most common reasons for this error ?
80A. 1. Conflicting or incomplete DCB subparameters.
2. No block size in the DD DUMMY.
3. Member name specified in the DD not found.

81Q. What is an OC1 abend ?


81A. Operation exception.

82Q. What is the difference between a SYSUDUMP and SYSABEND ?


82A. SYSABEND includes the system nucleus as well as the program processing area.

83Q. What is an OC5 abend ?


83A. Addressing exception.

84Q. What does PSW stand for ?


84A. Program status word - register that contains the last instruction executed.

Q: Why do you use a CONTROL CARD?


A: A CONTROL CARD can be a member of a PDS or a sequential
dataset and is used for storing the date fields, definitions of VSAM
files etc., We use CONTROL CARD because we cannot use an in-
stream procedure in a procedure. Generally you will be calling a
PROC from your JCL and you cannot code instream procedure in the
PROC and so you will point to the dataset, which is called
controlcard.

Q: How do you submit JCL via a Cobol program?


A: In your JCL define as:
//JOBA JOB 1111,JOB1
//STEP01 EXEC PGM=PROG1
//ddname DD SYSOUT=(*,INTRDR)....and

your COBOL (PROG1) should look like this:

SELECT JCL-FILE ASSIGN TO ddname.

Open this file and write the JCL statements into this file.
Example:

JCL Questions Amit Sethi Page 37 of 51


MOVE '//TESTJOB JOB 1111,VISVEISH' TO JCL-REC.MOVE '//STEP01
EXEC PGM=IEFBR14' TO JCL-REC.and close this file. Then TESTJOB
will be submitted.

Q: How do you submit a JCL under CICS environment?


A: Pass all the JCL codes to a COBOL variable (should be declared
using OCCURS clause) and then write the line one by one to the spool
using CICS commands like SPOOLClose, SPOOLOpen and
SPOOLWrite. For more help refer CECI of CICS or CICS manual.

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: Define COND parameter in JCL?


A: COND is a condition parameter, consists of 2 subparameters, 1st -
return code from the previous step, 2nd - condition. If COND is true,
the step on which COND is coded will be BYPASSED.
It is compared with system return code of previous step
//STEP1 EXEC PGM=ABCD
//STEP2 EXEC PGM=XYZ, cond=(4,lt)
STEP 2 will be executed when system return code of step1 is less
than 4.

Q: What is meant by S0C-07 system ABEND codes?


A: S0C7 - Data exception error - you will get it whenever you are
trying to move the low values or spaces into the numeric field, or
compare the numeric fields with low values, or try to do some
arithmetic operations on the low values. To avoid this you have to
always initialize the numeric fields otherwise they will contain the
low values.

Q: How to pass the temp dataset form one JOB step to another?
A: By specifying the DISP as PASS for the temp dataset

Q: Write a JCL to execute a Job by 7:00 AM on Jan 20,1986?


A: The code is:
//*MAIN DEADLINE=(0700,B,012086)

Q: How many types of libraries are there in JCL?


A: Libraries are of three types:
 System Libraries:- such as SYS1.LINKLIB
 Private Libraries:- Specified in a JOBLIB or STEPLIB DD
STATEMENTS.
 Temporary Libraries:- Created in a previous step of the Job.

Q: What do you mean by INCLUDE statement in JCL?


A: An INCLUDE statement identifies a member of a PDS that contains
this set of JCL statements is called an INCLUDE group. The system

JCL Questions Amit Sethi Page 38 of 51


replaces the INCLUDE statement with the statements in the
INCLUDE group.

Q: What are the Maximum number of In-stream procedures you can


code in any JCL?
A: 15.

Q: What you mean by skeleton JCL?


A: JCL, which changes during run time,that is the values for the JCL
such as program name, dd name will change. The same JCL can be
used for various jobs, equivalent to dynamic SQL;

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: What is the maximum blocksize for a Tape file?


A: It is 32,760. Based on that we can calculate efficient number of
Records in a Block

Submitted by: Aurobindo K.S. ([email protected])


Q: What are the basic JCL Statements for a Job?
A: The basic JCL statements for any job are:
 JOB : Identifies a job and supplies accounting info
 EXEC : Identifies a job step by indicating the name of the
program to be executed.
 DD : Identifies a data set to be allocated for the job step
 Delimiter (/*) : Marks the end of an in-stream dataset
 Null (//) : Marks the end of a job
 Comments (//*) : Provides Comments
 PROC : Marks the beginning of a procedure
 PEND : Marks the end of a procedure
 OUTPUT : Supplies options for SYSOUT processing.

Q: What does the statements: TYPRUN=SCAN and TYPRUN=HOLD


do in a JCL statement?
A TYPRUN= SCAN checks the JCL for errors, TYPRUN= HOLD holds
the job until further notice.

Q: What is QSAM error usually when it occurs?


A: Usually it occurs at the time of job submission.

Q: What is the purpose of INCLUDE statement in a JCL?


A: It is used as an alternative for STEPLIB. When we specify the
dataset name in INCLUDE , it will search in all the datasets specified
in the INCLUDE dataset.
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.

JCL Questions Amit Sethi Page 39 of 51


Q: What does SOC-04 error mean?
A: This error is faced when we execute the Cobol program. The main
reason for this error is that a variable is defined with fewer
characters and we are trying to move data, which is larger than the
actual storage space.

Q: In which table PLAN is registered in?


A: RCT

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 do you mean by spooling?


A: This is managed by JES. This is used for Queuing the Outputs that
are intended for Printing and are first stored in SPOOLDASD.

Q: How many Instream-Procedures (PROCs) can be coded in a single


Job?
A: 15

Q: For how long a Job can be executed continuously on a Mainframe?


A: 248 DAYS

Q: How may divisions are there in JCL-COBOL?


A: SIX

Q: What is the Maximum number of DD Statements to be coded in a


single JCL?
A: 3273

Q: How much space OS allocates when you create a PS or PDS?

JCL Questions Amit Sethi Page 40 of 51


A: 56 KB

Q: What is the minimum number of Dataset names (PDS) in one


Directory Block?
A: SIX

Q: What is the maximum number of steps in a Job?


A: 255

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: What is the use of DSNDB07?


A: This is the area where sorting takes place in DB2

Q: What is DATACOM DB?


A: It is a Database used with VSE.

Q: What is a Dummy Utility and what it does?


A: IEFBR14 is a Dummy utility and it is used for the sakeof EXEC
PGM= .... statement in JCL [when used it wouldn’t perform any task].
e.g. While Allocating a dataset you don't have to run any utility [this
could be done by giving disp=new in DD statment]. But for a PGM
name must be given in EXEC statment, it is used.

Q: What 3 guidelines do we have to follow when concatenating DD


statements?
A: The three guidelines for concatenating DD Statements are:-
 Datasets must be of the same type (disk or tape)
 All datasets must have the same logical record length (LRECL)
 The dataset with the largest blocksize must be listed first.

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.

JCL Questions Amit Sethi Page 41 of 51


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: What is the difference between STATIC CALL & DYNAMIC CALL?


A: In the case of STATIC CALL, the called program is stand-alone and
an executable. During run time we can call it in our called program.
In a DYNAMIC CALL, the called program is not an executable
program and it can executed through the called program

Q: What is the difference between CATALOGED PROCEDURE and IN-


STREAM PROCEDURE?
A: INSTREAM PROCEDURES are set of JCL statements written
between JOB and EXEC statements, start with PROC and end with
PEND statement. Mainly used to test cataloged procedures.
CATALOGED PROCEDURES are cataloged on the procedure library
(PROCLIB) and is called by specifying the procedure name on the
EXEC statement.

Q: Can we browse or edit the GDG dataset if it is a tape entry?


A: No

Q: What are the maximum and minimum sizes of any CONTROL


AREA (VSAM datasets)?
A: Minimum Size : 1 track; Maximum size : 1 cylinder

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]

JCL Questions Amit Sethi Page 42 of 51


Q: What are the three basic types of statements in a jobstream?
A: The three basic types of statements in a jobstream are:
JOB : We can code one per jobstream
EXEC : It can be one or more per job
DD : one or more per jobstep);
JOB – It indicates start of jobstream to the operating system and
through parms coded on it, it contains certain details about the job
(like time, region, message level, job accounting data).
EXEC – It indicates the start of execution of a particular job step, be
that step a program or a proc.
DD – It is a data definition statement, which is used to describe the
attributes of a dataset (like name, unit, type, space, disposition etc.,).

Q: What does SYSIN * indicate?


A: Instream data follows this card and is terminated when followed
by a card containing // or /* in columns 1 and 2.

Q1. What are the kinds of job control statements?

A1. The JOB, EXEC and DD statement.

Q2. What is the meaning of keyword in JCL? What is its opposite?

A2. 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.

Q3. Describe the JOB statement, its meaning, syntax and significant keywords.

A3. 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.

Q4. Describe the EXEC statement, its meaning, syntax and keywords.

A4. 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.

Q5. Describe the DD statement, its meaning, syntax and keywords.

A5. 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.

Q6. What is a PROC? What is the difference between an instream and a catalogued
PROC?

JCL Questions Amit Sethi Page 43 of 51


A6. 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.

Q7. What is the difference between a symbolic and an override in executing a


PROC?

A7. 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.

Q8. What is RESTART? How is it invoked?

A8. RESTART is a JOB statement keyword. It is used to restart the job at a


specified step rather than at the beginning.

Q9. What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?

A9. 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.

Q10. Explain concatenating datasets.

A10. 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.

Q11. What is the difference between specifying DISP=OLD and DISP=SHR for a
dataset?

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

Q12. What is MOD and when would you use it?

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

Q13. 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?

A13. 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.

Q14. How do you designate a comment in JCL?

A14. The comment statement is //* followed by the comments.

JCL Questions Amit Sethi Page 44 of 51


Q15. What is the meaning of the EXEC statement keyword, COND? What is its
syntax?

A15. 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!)

Q16. What is the improvement to COND= in the latest version of MVS?

A16. 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.

Q17. What is the purpose of the PARM keyword in the EXEC statement?

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

Q18. What is the purpose and meaning of the REGION keyword and what JCL
statement is it associated with?

A18. 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.

Q19. What is the purpose and meaning of the TIME keyword and what JCL statement
is it associated with?

A19. 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.

Q20. What is the meaning of data definition name (ddname) and dataset name
(dsname) in the DD statement?

A20. 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.

Q21. How is the keyword DUMMY used in JCL?

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

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

A22. 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.

JCL Questions Amit Sethi Page 45 of 51


Q23. What is the difference between BLKSIZE and LRECL?

A23. BLKSIZE specifies the number of bytes

Question: What is JCL


Answer: JCL is Job Control Language and is used for Batch processing. The startup
procedures
of OS and standard products like CICS etc are written in JCL.

Question: GDG?
Answer: 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 gen.number, yy-version number. Can be sequential, direct, partitioned. (VSAM -
no). Must always be cataloged. Advantage - 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

Question: what is JCL?


Answer: it is used to communicate between the terminals.

Question: what do you mean by spooling? Expand SPOOL?


Answer: This is managed by JES. This is used for Queuing the Outputs that are intended for
Printing and are first stored in SPOOLDASD.

Question: How many In stream-Procedures (procs) can be Coded in a single Job?


Answer: The Answer is: 15

Question: FOR HOW LONG A JOB CAN BE EXECUTED CONTINUEOUSLY IN A M/F


Answer: 248 DAYS

Question: How may divisions are there in JCL-


Answer: SIX

Question: MAX. NO OF DD STATEMENTS IN A JOB


Answer: 3273

Question: HOW MUCH SPACE OS ALLOCATES WHEN YOU CREATE A PS OR PDS?


Answer: 56 KB

Question: MIN NO OF DATASET NAMES(PDS) IN ONE DIRECTORY BLOCK?


Answer: SIX

Question: THE MAXIMUM NUMBER OF STEPS IN A JOB?


Answer: 255

JCL Questions Amit Sethi Page 46 of 51


Question: How much is memory space involved, when we code BLOCKSIZE,TRK & CYL
Answer: One block constitutes 32KB of formatted memory/ 42KB of Unformatted memory, 6
blocks makes one Track & 15 Tracks makes one cylinder.

Question: Corrections in the answers.


Answer: I think the answer for the question by Kyati on march 19/1998 about Maximum number
of extents in secondary allocation is 16 & not one. I think there is a missing Disposition parameter
for the question by Anon on march 11\1998-- Please add PASS.

Question: What is the difference between IEBGENER, IEBCOPY and REPRO in IDCAMS
utility?

Answer: IEBGENER -- This is a dataset utility for copying sequential datasets which produces a
PDS or a member from a sequntial dataset.IEBCOPY -- This is a dataset utility for copying one
PDS to another or to merge PDSs.REPRO -- This is for copying sequential datasets. More or less
same as the IEBGENER.RAVI

Question: How do you submit JCL via a COBOL program?

Answer: Use a file //dd1 DD sysout=(*,intrdr)write your JCL to this file. Pl some on try this out.

Question: How to execute a set of JCL statements from a COBOL program

Answer: Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command.var-name is a


COBOL host structure containing JCL statements.

Question: What does SYSIN * indicate?


Answer: Instream data follows this card and is terminated when followed by a card containing //
or /* in columns 1 and 2.

Question: What are three major types of JCL statements? What are their functions?
Answer: JOB, EXEC, DD. JOB - indicates start of jobstream to the operating system and
through parms coded on it, certain details about the job (time, region, message level, job
accounting data). EXEC - indicates the start of execution of a particular job step, be that step a
program or a proc.DD - is a data definition, which is used to describe the attributes of a data set
(name, unit, type, space, disposition).

IDMS
Q1. What is the difference between a schema and a subschema?

A1. The schema is the physical arrangement of the data as it appears in the
DBMS. The subschema is the logical view of the data as it appears to the
application program.

JCL Questions Amit Sethi Page 47 of 51


Q2. What is a region?

A2. Region is used synonymously with area. It is a group of logically contiguous


pages.

Q3. What is a page?

A3. A page is the smallest unit of storage in an IDMS database.

Q4. Explain the difference between record occurrence and record type.

A4. A record occurrence is the instances of a record; it is the smallest


addressable unit of data. A type is the description of a record; there needn't
be any occurrences.

Q5. What is the difference between local and central version operating modes?

A5. In local there is no IDMS System running above the DBMS. It's the more
efficient mode but lacks the recovery and integrity facilities of the central
version (CV) control program. In CV many application programs access the
database through a single copy of the DBMS.

Q6. What is a run unit?

A6. A run-unit is a logical unit of work; it is analogous to a CICS task.

Q7. What is an OOK-Rec?


A7. An OOK-Rec is a one of a kind record set, used to get to another record set.
5/4/99: Sihab: 'I have one doubt in IDMS regarding the OOK records. In this FAQ
it is saying that "A OOK-Rec is a one of a kind record set, used to get to
another record set". Can you please elaborate it little more? What is it mean by
'a kind of record set'. If possible give me a small example also. Please send
reply to [email protected].' Web note: Sorry, but my recollection is vague
on this one. I think the example was a system date - just the one record, not a
set, that pointed to other sets. Hopefully, someone else will fill in the
blanks. Or perhaps a call to Computer Associates.

Q8. What is a junction record?

A8. A junction record is a member record type that allows for many-to-many
relationship between its two owner records. For a school database the CLASS
record is a junction for the TEACHER and SUBJECT record types.

Q9. Name and explain the three location modes.

A9. Calc is based on a symbolic value which is used to determine the target
page. Via mode is for members only. Via records are stored near to their owners.
In direct mode the target is specified by the user and is stored as close as
possible to that page.

JCL Questions Amit Sethi Page 48 of 51


Q10. What is a set? What pointers are required, what are possible? How may sets
be ordered?

A10. A set is an owner record and, optionally, its member records. There are
three types of pointers: next, prior and owner, but only next is required. There
are five possible orders for arrangements of sets; they are: first - insert at
beginning, last - insert at end of set, next - insert after current of set,
prior - insert prior to current of set and sorted - insert according to sort
value.

Q11. What is the purpose of a READY?

A11. The READY prepares a database area for access by DML functions.

Q12. What does a COMMIT statement do?

A12. It writes a checkpoint to the Journal File and releases any record locks.

Q13. What does a ROLLBACK do?

A13. It rolls back (reverses) all database updates to the point of the last
rollback or to the beginning of the run-unit.

Q14. What does a FINISH do?

A14. It releases all database resources, terminates database processes, writes


statistical information to IDMS and logs the checkpoint.

Q15. What is the IDD?

A15. IDD is the Integrated Data Dictionary. It contains information about the
elements, record types, sets, maps and dialogues within the database.

Q16. What is the meaning of the return codes 0307 and 0326?

A16. 0307 is end-of-set and 0326 is record not found.

Q17. What is the meaning of 'Copy IDMS Subschema-Binds'?

A17. It generates a bind run-unit and binds all the records for the sub-schema
the program is referencing.

Q18. What is autostatus?

A18. Autostatus is a protocol mode which causes the expansion of each DML
statement to include a 'perform IDMS-Status' statement.

Q19. What does a store statement do?

A19. It places a record in the database based on the location mode specified.

JCL Questions Amit Sethi Page 49 of 51


Q20. What sets will the stored record connect to?

A20. It will connect to all sets where it is defined as an automatic member. The
store requires that currency be established for all these set occurrences.

Q21. What is currency?

A21. The old joke - where the programmer thinks he is, but the DBMS knows he
isn't. Currency is the location within the database during run-unit execution.
There are four levels of currency: current of run-unit is the record occurrence
of the last successful find or obtain; current of record type is for the most
recent of each record type; current of record set is the most recent within each
set and current of area is within each area.

Q22. If the stored record is not defined as automatic of a set, how can it be
stored as a member of the set.

A22. Store the record then connect it to each set where it is a manual member.

Q23. So manual and automatic are the connect options for a set. What are the
disconnect options.

A23. Mandatory and optional.

Q24. Distinguish among erase, erase permanent, erase selective and erase all.

A24. Erase cancels the membership of a record in specific set occurrences and
removes only the named record. Erase permanent removes the specific record and
all mandatory occurrences it owns. It disconnects all optional members. Erase
selective removes the record, all mandatory members and all optional members not
connected to other sets. It disconnects those that are connected. Erase all
removes the specified record and all the mandatory and optional records it owns.

Q25. How does IDMS insure data integrity?

A25. IDMS uses record locks to prevent another run-unit from updating the same
record.

Q26. What are the types of record locks and how are they set?

A26. Locks may be shared or exclusive. Shared means that other run units can
retrieve the record but can not modify it. Exclusive means that other run units
can neither retrieve nor modify it. Record locks may be implicit or explicit.
Implicit locks are set in the ready statement usage clause. Explicit locks are
set using either the keep statement or keep option of the find/obtain command.

Q27. How are record locks released?

A27. Locks are released by a change in currency or by a commit, rollback or


finish command.

JCL Questions Amit Sethi Page 50 of 51


Q28. What does a status return code of nn29 mean in relation to record locks.

A28. nn29 means that two run units are waiting to set locks on the same record
and are in deadlock.

Q29. What is an area sweep and when is it used?

A29. An area sweep accesses records on the basis of the physical location in a
database area. It can be total, meaning a record by record search of the area,
or it can be of occurrences of records of a specific type.

Q30. Why would you use find and get rather than an obtain?

A30. Find tells you whether the record is actually in the database. If it is not
found you save the overhead of an obtain.

Q31. When you are obtaining next within a set and get a end of set return code,
on what record are you now current?

A31. You are current on the owner.

Q32. What is a bind?

A32. A bind associates record types with the program work area; for run unit and
records it is the first command issued in the program.

Q33. How does IDMS communicate with CICS?

A33. They communicate via service MVS request calls.

Q34. Is there a application program coding difference between local and central
version mode?

A34. No. The mode is specified via the SYSCTL DD card in the JCL.

Q35. If you are current on the owner of a set, what is the difference between an
obtain next and obtain first?

A35. No difference. There is a difference between obtain first and obtain next
for an area sweep, but not when current on the owner in a set.

JCL Questions Amit Sethi Page 51 of 51

You might also like