Geocities JCL Interview Questions
Geocities JCL Interview Questions
(1) Tells the system what to do with the dataset following normal termination of the
step
(3) Tells the system what to do with the dataset following abnormal termination of the
step
1
(3) Marks the beginning of a job & assigns a name to the job
6) How can a job send a status message to a TSO user at the completion of
a job ?
(1) STATUS
(2) NOTIFY
(3) ENDMSG
(4) USER
(1) START
(2) RUN
(3) EXEC
4. GO
10) How can unused space allocation be returned to the system when a
dataset is closed ?
2
(1) RETURN
(2) RLSE
(3) CONTIG
(4) CLOSE
11) Can an individual step be restricted from using all the job’s allowed CPU
time ?
(1) Yes
(2) No
13) How can the disposition of sysout datasets be set for an entire
jobstream ?
(1) STREAM
(2) SET
(3) PROC
(4) PEND
3
15) What is the function of DD name parameter with a 2 part structure;
Audit.Report ?
(1) //
(2) //*
(3) /*
(1) 71 bytes
(2) 60 bytes
(3) 55 bytes
(4 ) 80 bytes
4
20) What is the purpose of DD DUMMY statement ?
21) Many JCL statements contain specific values designed to direct &
control the execution of the statement. What are these fields called ?
(2) Parameters
(4) Includes
22) When space is allocated for an output dataset, what units can be used?
(1) Disks
(2) Megabytes
(4) Bytes
(1) //
(2) //*
(3) /*
5
25) What DD statement is used to supply the name of a dataset ?
(1) Name
(2) Dsname
(3) Label
(4) File
29.What is concatenating?
6
30.How can values be passed from the job stream to an executable
program?
(1) Yes
(2) No
(4) Identifies the libraries that the system will search for include groups or
procedures named in EXEC statements
33. What parameter of the job statement is used to limit the CPU time
consumed by the job?
(1) RUNTIME
(2) TIME
(3) LIMIT
(4 ) EXECMAX
(1) STREAM
7
(2) SET
(3) PROC
(4) PEND
36.In order to continue a job after a return code of 12 in step1, what the
step2 EXEC statement include?
(1) CONTINUE
8
39.What parameters can be used to limit the number of records written
to a SYSOUT dataset ?
(1) LIMIT
(2) OUTLIM
(3) SIZE
(4) MAX
(1) LINK
(2) CONNECT
(3) XMIT
(4) SEND
(1) JOBLOG
(2) MSGCLASS
(3) MSGLEVEL
(4) SYSLOG
9
(4) Attributes cannot be copied within SMS datasets
45.If a (+1) generation dataset is created in the first step of a job, how
can it be referenced in later steps of the same job for input?
(2) Specifies the multiplier to be used for primary & secondary space
allocation
(3) Directs the system to allocate space based on average record length
48.To connect EBCDIC records to ASCII during write process, what DCB
sub-parameter is used ?
(1) EBCDIC = NONE (2) ASCII = ALL (3) TRANSLATE = ALL (4) OPTCODE = Q
10
49.If a generation data set is specified as input without the generation
number, what will the input to the DD ?
11
(3) a list of datasets available to MVS along with the location data
39.If both the JOBCAT & STEPCAT statements are coded in a step, which
will be executed?
(1) JOBCAT
(2) STEPCAT
12
JCL INTERVIEW QUESTIONS
1. What is primary allocation 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.
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.
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.
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.
13
9. What do you do if you do not want to keep all the space allocated to a
dataset?
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?
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.
where procstep = name of the jcl step that invoked the proc
and stepname = name of the proc step where you want execution to start
Can use either condition codes or use the jcl control statement IF (only in ESA JCL)
13a. A PROC has five steps. Step 3 has a condition code. How can you
override/nullify this condition code?
All parameters on an EXEC stmt in the proc such as COND, PARM have to be
overridden like this.
//<stepname.dd> DSN=...
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
14
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.
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.
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.
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.
20. Why do you want to specify the REGION parameter in a JCL step?
21. 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.
Means execute this step even if any of the previous steps, terminated abnormally.
Means execute this step only if any of the previous steps, terminated abnormally.
24. How do you check the syntax of a JCL without running it?
15
TYPERUN=SCAN on the JOB card or use JSCAN.
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.
Code the DSN as pds(member) with a DISP of SHR. The disp applies to the pds and
not to a specific member.
27. 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).
28. 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
/*
No.
One way is to code SYSIN DD DUMMY in the PROC, and then override this from the
JCL with instream data.
31. How do you run a COBOL batch program from a JCL? How do you run a
COBOL/DB2 program?
16
//STEP001 EXEC PGM=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(....)
RUN PROGRAM(MYPROG)
/*
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.
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.
JOBLIB is ignored.
The library with the largest block size should be the first one.
37. 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.
17
39. 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.
18