Q: What is an Operation Exception error?
A: An Operation exception error
indicates that an operation code is not assigned or the assigned operations not
available on a particular computer model. The machine does not recognize the
instruction or operation used. A possible reasons a subscript error. This error
could also be caused by an attempt to read a file that was not opened, a
misspelled DD statement.
A: An addressing exception error
occurs when a program is attempting to access a memory location, which is
outside the bounds of a available real storage on the machine.
This can
be caused by a dataset not being open end at the time an I/O was directed to it,
an attempt to close a dataset a second time, incorrectly called module
parameters or coding, improper exit from a performed paragraph, or uninitialized
subscript or index. The system completion code is 0C5.
Q: What is a data
exception?
A: A data exception error indicates an attempt to perform an
arithmetic operation on non-numeric data. It can also occur from incorrect input
data to a program that is not performing sufficient numeric testing on it before
attempting arithmetic. The system completion code is 0C7.
Q: What return
code is issued when a operator cancels a job?
A: There are two return
codes, which can be produced when the operator cancels a job. They are 122 and
222. A 122 indicates the operator cancelled the job and requested a dump. A222
indicates the operator has cancelled the job and has not requested a
dump.
It is important to ask the operator why the job was canceled. Some
of the reasons this may occur are: the program appeared to be stalled in a wait
state; or the program was in an apparent loop.
Q: What return code is
issued if a job step exceeded the time limit?
A: The system will issue a
system code of 322 when a job or job step has exceeded the time limit .If the
time parameter was used on the JOB or EXEC statement. If the time parameter was
not used, then it is important to check the program possible errors.
Q:
When the system cannot find enough virtual storage, which system abend is
issued?
A: When the system cannot find enough virtual storage during a
GETMAIN macroinstruction, it generates a system abend of 804 or 80A. Check for
program errors that incorrectly modify the storage request. If the REGION
parameter has been used, either on the JOB or EXEC statement, it may need to be
increased to satisfy the request.
Q: Which system completion code is
issued when a program module cannot be found?
A: A system completion code
of 806 will be issued when a program module cannot be found. Some of the causes
may be missing the STEPLIB statement from the step or missing the JOBLIB
statement from the job stream. Most likely the program name was misspelled on
the EXEC statement or in a source code CALL.
Q: What are some of the
abend generated when not enough disk space is available and what do they
mean?
A: Some of the abend generated due to a lack of available disk
space are:
B37 -- Disk volume out of space, cannot write output. The
system gave all the primary space and as much secondary space as it
could.
D37 -- Primary disk space was exceeded and either no secondary
space allocation was specified or it was insufficient. One should increase the
primary space as well as provide adequate secondary allocation was specified or
it was insufficient. One should increase the primary space as well as provide
adequate secondary space allocation to eliminate this error.
E37 -- There
was insufficient space on the volume. One way to solve this problem is to
specify more volumes on the JCL.
Q: Which abend is issued when the system
cannot find a member on a portioned dataset?
A: An S013-18 abend occurs
when the specified member on the JCL, is not found on the indicated PDS
(Partioned Dataset). Determine if the member is spelled correctly on your JCL.
If it is not, then fix member name and resubmit job. If it is correct, then
determine why it is not on the PDS, take the necessary steps to place it on the
PDS, and resubmit the job.
Q: What normally causes an S013-20
abend?
A: An S013-20 is normally caused by the block size not being a
multiple of the record length or being incorrect for variable-length records.
Divide your BLKSIZE by the record length to make sure it is a multiple of the
BLKSIZE if not, correct it and resubmit job. For variable-length records, it is
necessary to have your BLKSIZE be at least 4 bytes greater than your record
length.
Q: What can be done to eliminate a ‘NOT CATLG 2’ for a particular
dataset?
A: To eliminate a ‘NOT CATLG 2’ message, one may take one of the
following options.
Add a step to the beginning of the JOB, which creates
the dataset to first purge the dataset. One may to use utility IEFBR14 to
perform this task.
Setup a job to purge the dataset and run it before the
job which creates it purges the dataset before running the job, which creates
it.
Q: If a job step is in a wait state for 30 minutes or more with no
activity, which abend does one receive?
A: If a job step is in a wait for
30 minutes or more with no activity, the job abend with an s522 indicating the
time was exceeded for the wait state. This type of cancellation is unusual and
is often caused by a program error or unavailable datasets /
resources.
Q: A system completion code of 813-04 is generated when a
dataset name and volume serial number for a tape is not consistent with the
information contained in the tape dataset label. What can be done to fix this
problem?
A: When a system completion code of 813-04 is received, one must
check the spelling of the dataset name in the JCL and the volume serial number
specified. If possible, dump the dataset label to see the actual dataset name on
the tape. Once the problem has been identified, correct it and resubmit the
job.
Q: How does one fix a ‘PROCEDURE NOT FOUND ‘ ERROR?
A: If one
receives a ‘procedure not found’ message, it indicates that it could not find
the procedure on the procedure library specified on the JCL. Check the spelling
of the procedure library specified on the JCL.
Check the spelling of the
procedure name on the EXEC statement to make sure it is correct .if it is not
correct, fix it and resubmit the job.
If the JCL is correct, then check
to make sure the procedure has been cataloged into the procedure library. If
not, have it cataloged and resubmit the job.
1.2. GENERATION DATA
GROUPS
Q: What is a Generation Data Group (GDG)?
A: A generation
Data Group is a group of chronologically or functionally related datasets. GDGs
are processed periodically, often by adding a new generation, retaining previous
generations, and sometimes discarding the oldest generation.
Q: How is
GDG base created?
A: A GDG base is created in the system catalog and
keeps track of the generation numbers used for datasets in the group. IDCAMS
utility is used to define the GDG base for MVS/XA, and MVS/ESA. Older systems
required that the IEHPROGM utility be used.
Q: What is model dataset
label (Model DSCB)?
A: A model dataset label is a pattern for the dataset
label created for any dataset named as part of the GDG group. The system needs
an existing dataset to serve as a model to supply the DCB parameters for the
generation data group one wish to create. The model dataset label must be
cataloged. The model DSCB name is placed on the DCB parameter on the DD
statement that creates the generation data group.
Q: What is the
advantage in using generation data groups?
A: The advantage in using the
generation data groups is that all datasets have the name, and the system keeps
track of adding and deleting successive generations. The JCL does not need to be
changed between runs.
Q: How are GDG concatenated?
A: Generation
data groups are concatenated by specifying each dataset name and the generation
number of all generations of the generation data group . To retrieve all
generations of a generation data group, omit the generation number. The DD
statements refers to all generations
The result is the same as if all
individual datasets were concatenated. If generations are not on the same
volume, this will not work.
Q: How are different generations
specified?
A: Different generations are specified by providing the
dataset name and generation number for each GDG desired.
Q: What is the
status of the GDG when an abend occurs?
A: The GDG is in a bad state
because it may consist of partial information. If used in this state, it is
possible to get incorrect or improper results. It is recommended to reset the
current generation by deleting the bad generation before executing the job,
which will re-create a new generation.
Q: How is a previous GDG
coded?
A: Previous GDGs are coded as (-1) after the dataset name. An
example would be DSN=JAN.DATA(-1).
Q: How is the current GDG
coded?
A: Current GDGs are coded as (0), (+0), or (-0) after the dataset
name as follows: DSN=JAN.DATA(0). The +(0) and (-0) have the same effect as (0)
Normally, it is coded as (0).
Q: How is a new GDG coded?
A: A new
GG is coded as (+1) after the dataset name as follows:
DSN=JAN.DATA(+1).
This will cause all generations to be pushed down one level at the end of the
job.
1.3. DD STATEMENTS
Q: What is the purpose of the Data
Definition (DD) Statement?
A: Data Definition statements describe each
dataset (a file on a direct-access storage device, tape or printed output) and
request the allocation of I/O devices.
Q: Describe what the DISP
parameter does?
A: The DISP parameter describes the current status of the
dataset and directs the system
on the disposition of the dataset either
at the end of the job or when the step abnormally terminates . DISP always
required unless the dataset is created and deleted in the same step
Q:
How many subparameters does the DISP parameter consist of and what is the
meaning of each?
A: The DISP parameter consists of three subparameters:
start-status, end-status-normal and end-status-abend. Start-status indicates the
status of a dataset at the beginning of the job step. End-status-normal tells
MVS what needs to be done with the dataset when the job step ends.
End-status-abend indicates the desired disposition of the dataset if the job
step abend. It is also known as the conditional disposition.
Q: What are
the meanings of the parameters used (within) the DISP parameter at the beginning
of the job step?
A: The status NEW, MOD, OLD, or SHR is the status of the
dataset at the beginning of the step. If the dataset is NEW, the system creates
a dataset label; if it is OLD, the system locates the dataset. The system gives
a program exclusive control of a database except when SHR is used.
Q:
What are the normal “disposition” of the DISP parameter?
A: The normal
disposition indicates the disposition of the dataset when the dataset is closed
or when the job terminates normally. Normal dispositions are KEEP, DELETE, PASS,
CATLG, and UNCATLG.
Q: What is the abnormal “disposition” of the DISP
parameter?
A: The abnormal disposition would be effected only if the step
abnormally terminates. They are the same normal disposition as except that PASS
is not allowed KEEP, CATLG, UNCATLG and DELETE are all permitted.
Q: When
should DISP=SHR be used?
A: DISP=SHR must be used only when it is
necessary to share the dataset.
SHR should b used for input
dataset.
Q: When should DISP=MOD be used?
A: DISP=MOD is used to
either to extend an existing sequential dataset or to create a dataset if it
does not exist. If the dataset exists the records are appended at the end of the
existing dataset. If the dataset does not exist the system treats mod as if it
were NEW, provided that the volume parameter has not been used. If the volume
parameter is used, the system terminates the job and does not create the new
dataset. MOD can be used to add to the dataset that extends to several volumes.
Always specify a disposition of CTLG with the MOD for cataloged dataset, even if
they are already cataloged, so that any additional volume serial number will be
recorded in the catalog.
Q: When should DISP = OLD be used?
A:
DISP = OLD should be used for an existing dataset. It can be used with an input
dataset to read or an output dataset to rewrite. The step which uses DISP=OLD
will have exclusive control of the dataset. If an OLD dataset is cataloged, the
DSN parameter is usually the only other parameter needed. If an LD dataset is
not cataloged, UNIT and VOL parameter are required.
Q: When should DISP =
NEW be used?
A: DISP=NEW should be used when it is desired to create a
dew dataset. The UNIT parameter is usually required for dataset on direct access
volumes.
Q: How is a dataset passed from one step to another?
A: A
dataset is passed from one step to another based on what is coded on the DISP
parameter. The dataset can only be passed to subsequent steps if PASS is used on
the disposition parameter.
Q: If a dataset is passed and the subsequent
steps do not use it, what happen to the dataset at the end of the job?
A:
If a dataset is passed to subsequent steps and it is not used, at the end of the
job the dataset is deleted, since DELETE is assumed for all NEW datasets,
temporary or non temporary.
Q: What is the default for the disposition
parameter if it’s not coded on the DD statement for a dataset?
A: The
default disposition used on a dataset, which was coded without a disposition
parameter, is NEW. The disposition of NEW implies exclusive control of the
dataset.
Q: How are dataset concatenated?
A: Datasets are
concatenated by writing a normal DD statement for the first dataset and the
adding a DD statement without a DDNAME for each dataset to be concatenated in
the order they are to be read. The following is an example of three datasets
concatenated:
//INSMP DD DSN=JAN.DATA, DISP=SHR
// DD
DSN=FEB.DATA, DISP=SHR
// DD DSN=MAR.DATA, DISP=SHR
Q: Can
datasets of a different record length (LRECL) be concatenated?
A:
Datasets with different LRECLs can be concatenated as long as the dataset with
the largest block size appears first.
Q: Can Partitioned Datasets (PDSs)
be concatenated?
A: Partitioned Datasets can be concatenated. This is
often done for program libraries so that the system can search several libraries
fro a member.
Q: What is a Data Control Block (DCB)?
A: The Data
Control Block is a table of data, in storage, that describes each dataset used
by the program.
Q: What are two different places from which DCB
information can be obtained and in what order?
A: Data information can be
obtained from three places in the following order:
The data control
block, from application program, is used first.
Information supplied on
the DD statement is used second.
Dataset label information for the DCB is
used third.
Q: What is the purpose of using a dataset
referback?
A: A dataset referback is used to copy a dataset name from a
prior job step.
Q: What are the disadvantages of using a dataset
referback?
A: The disadvantages of using dataset referback is that they
tend to make JCL more difficult to maintain because close attention, scrutiny
and manual examination of preceding steps is needed to understand what a given
job-stream is doing. They also complicate the restart of a job if a failure or
interruption occurs.
Q: Under which circumstances is the disposition
parameter not performed?
A: Disposition is not performed under the
following circumstances:
The step does not start because of JCL
errors.
The step is bypassed because of the COND parameter in the JOB or
EXEC statement
The step abnormally terminates because it could not find
enough space to satisfy the request.
DUMMY or DSN=NULLFILE is coded on
the DD statement.
1.4. JOB, EXEC, AND PARM
Q: What is the purpose
of the JOB statement?
A: The purpose of the JOB statement is to inform
the operating system of the start of a job, give necessary accounting
information and supply run parameters. Each job must begin with a single JOB
statement.
Q: How does one identify a job to the Operating
system?
A: A job is identified to the system by the use of jobname.
Jobnames can range from one to eight alphabetic characters. The first character
must begin in column 3 and be alphabetic (A-Z). Jobs should be given unique
names since duplicate jobnames will not execute until any job having the same
jobname completes execution.
Q: What does the accounting information
consist of?
A: Accounting information consists of the account number of
which the job is charged and any additional information established by the
installation.
Q: What does the parameter CLASS in the JOB statement
mean?
A: Parameter CLASS specifies the job class. There are 36 possible
job classes (A-Z, 0-9). Installations usually attempt to establish job classes
that achieve a balance between I/O bound and CPU-bound jobs. Job classes also
determine the overall priority of a job, along with the PRTY parameter PRTY may
be coded to give special priority to a job. The operator may also set
it.
Q: What is parameter MSGCLASS in the JOB statement used
for?
A: The MSGCLASS parameter is used to specify the job scheduler
message output class. The output classis (A-Z,0-9). Job scheduler message
include all messages not printed by the actual job steps being executed. Some of
these are: JCL statements and error messages, device allocations, dataset
disposition and accounting information.
Q: What does parameter MSGLEVEL
on the JOB statement mean and what is the advantage of using it.
A:
MSGLEVEL indicates whether or not one wishes to print the JCL statements and
allocation messages. The MSGLEVEL parameter can save paper. After a job is
debugged, there may be no need to print all the JCL and allocation messages each
time it runs. To reduce printing to a minimum one may wish to code MSGLEVEL =
(0,0)
Q: which parameter allows one to run a syntax check n the JCL
without executing it?
A: TYPRUN = SCAN parameter is used to check the JCL
for syntax errors and suppress the execution of the job. This checking does not
include checking for duplicate datasets on volumes, insufficient space or region
size for job steps.
Q: What does parameter TYPRUN = HOLD mean?
A:
The parameter TYPRUN = HOLD holds a job in the input queue for later execution.
The job is held until the operator releases it. TYPRUN=HOLD is useful for when
one job must not run until another job completes. Operator intervention is
required to release the job.
Q: What is the purpose of the EXEC
statement?
A: The purpose of the EXEC statement is to name a program or
procedure to be executed. It follows the job statement. A job or cataloged
procedure can contain several EXEC statements. A job may have up to 255 EXEC
statements.
Q: What is the stepname on the EXEC statement used for and is
it a required parameter?
A: Stepname on the EXEC statement is used to
name the job step. It is required if subsequent JCL statements refer to it or if
one wishes to restart the job from the step; otherwise it is optional. Stepname
are recommended and should have unique names. The names must begin in column 3
with an alphabetic or national character (A-Z, @$#)
Q: Which parameter is
used to name the program in the exec statement?
A: The parameter ‘PGM=’
is used to name a program or utility to be executed. For example, to code a
program named ‘FIRST’, one would code ‘PGM=FIRST’. For utility named ‘IEBGENER’,
it would be coded as ‘PGM=IEBGENER’.
Q: What are the commonly used
parameters on the EXEC statement and what do you they mean?
A: The most
commonly used parameters on the EXEC statement are: COND, PARM, REGION, and
TIME. They stands for:
1. COND – Specifies conditions to execute
subsequent job steps if the previous step(s) fail.
2. PARM – Passes
parameter to the job steps.
3. REGION – Specifies the region size to
allocate for the job / job step.
4. TIME – Imposes a time limit on the
job or job step.
Q: What is the default for the TIME parameter if it is
not coded on the EXEC statement?
A: If the TIME parameter is omitted from
the EXEC statement, the default is 30 minutes of the CPU time.
Q: What is
the difference between the JOBLIB & STEPLIB statements?
A: The JOBLIB
statement is placed after the JOB statement and is effective for all job steps.
It cannot be placed in the catalogued procedure. The STEPLIB statement is placed
after the EXEC statement and is effective for that job step only. Unlike JOBLIB
statement, the STEPLIB cannot be placed in the catalogued procedure.
Q:
What can be done to resolve a JCL error that reads ‘DATASET NOT
FOUND’?
A: Some of the actions one can take to resolve a JCL error
‘DATASET NOT FOUND’ are:
1. One must examine the job log and the
allocation/deallocation report and identify the step and DDname
involved.
2. Determine whether or not the dataset name does indeed exist
on the system.
3. Check the JCL to make sure the dataset name is spelled
correctly.
4. If the job has more than one step and the ABEND is not on
the first step, check to see if the dataset on the previous step was
deleted.
5. Fix the problem and resubmit the job.
Q: Does a ‘DD
STATEMENT MISSING’ message normally ABEND the job?
A: A DD statement
missing message normally does not ABEND the job, but if not fixed it could later
cause problems when least expected. It is advisable to determine why this
message was generated and take action to rectify the problem.
Q:
Parameters COND, REGION, AND TIME can be coded on both the JOB and the EXEC
statements. What are the differences between using them on the JOB versus the
EXEC statements, and in which statements are they commonly used?
A:
Parameters COND, REGION, AND TIME coded on the JOB statement will be in effect
for the entire job. When used on the EXEC statement, they will be in effect for
that job step only. The COND parameter is normally used on the EXEC statement.
The REGION parameter is not normally used unless a particular program requires a
lot of storage and it is necessary to override the installation’s REGION
Default. If the REGION parameter is used on the both JOB
and EXEC
statements, then the REGION parameter from the JOB statement will be in effect.
The TIME parameter is most often used on the JOB statement.
Q: Explain
how the virtual storage works in MVS/SP.
A: MVS/SP stands for Multiple
Virtual Storage / System Program. A major architectural component of virtual
storage MVS is virtual storage. With virtual storage, storage addresses of the
application program are independent of the addresses of the computers central
storage. A Hardware feature, paging supervisor, transfers the users virtual
storage addresses to the computers central storage addresses during execution.
With Virtual Storage, a program needs to occupy only a relatively small amount
of central storage. This allows programs to be run whose size exceeds the
central storage available on the computer.
Q: What are some of the main
features of MVS/XA?
A: MVS/XA stands for Multiple Virtual Storage /
Extended Architecture. MVS/XA uses 32 bits of addressing. This gives an address
space of approximately 2 billion bytes. The extended architecture also consists
of more sophisticated I/O channels for faster I/O. Also, a separate version of
OS is required. One of the difference is that a program for MVS/XA can go up to
2 billion bytes. Programs running under MVS/SP can go up to
16 million
bytes.
Q: What are the “basic architecture” features of
MVS/ESA?
A: MVS/ESA stands for Multiple Virtual Storage / Enterprises
System Architecture. MVS/ESA permits an application to have multiple 2-gigabyte
address spaces. This allows huge applications to be segregated into functional
parts. For ESA, the first address space is called the application space and
programs can execute in it. The other address space are called dataspaces and
they contain only data. MVS/ESA also has the facility for hyperspaces, which
allows temporary data to be stored or retrieved in 4-kbyte blocks under program
control. Maximum address space is up to 2 trillion bytes in multiple of
2-billion-byte address spaces.
Q: What is the meaning of the
“line”?
A: The “line” indicates the maximum address space that is
available for the MVS system. For MVS/SP it is 16 million bytes, for MVS/XA it
is up to 2 billion bytes, and MVS/ESA is up to 2 trillion bytes in multiple of
2-billion-byte address spaces.
Q: When would a program run “below the
line”?
A: A program would run “below the line” if it did not exceed the
address space available.
Q: When would a program run “above the
line”?
A: A program would run “above the line” if it required more than
16 megs or if it is competing with other programs which are using the same
address space. Special Parameters must be set for compilation and linkage
editing in order for a program to run above the 16-meg line.
1.5.
PROCS
Q: How are in-stream procedures (procs) built?
A: In-stream
procedures are built by coding a set of statements and placing them after the
JOB statement and before the EXEC statement. In-stream procedures begin with a
PROC statement and end with a PEND statement. Up to 15 in-stream procedures can
be included in a single job.
Each in-stream procedures may be invoked
several times within the job. In-stream procedures can use symbolic parameters
in the same way as catalogued procedures.
Q: What is the difference
between an in-stream procedure and a catalogued procedure?
A: An
In-stream procedure is basically same as a catalogued procedure. The difference
is that to execute an in-stream procedure one places it after the JOB statement
and before the EXEC statement and must end it with a PEND statement. A
catalogued procedure is catalogued on a procedure library and is called by
specifying the procedure name on the EXEC statement. An in-stream procedure is
useful to test the procedure before making it a catalogued procedure.
Q:
Name some of the JCL statements that are not allowed in the procs.
A:
Some of the JCL statements that are not allowed in the procs are:
1. JOB
Delimiter (/*) or Null (//) statements
2. JOBLIB or JOBCAT DD
statements
3. DD * or DATA statements
4. Any JES2 or JES3 control
statements
Q: What parameters are good candidates to make symbolic
parameters?
A: Any parameter, sub parameter, or value in a procedure that
may vary each time the procedure is called is a good candidate to be coded as a
symbolic parameter.
Q: Which type of override parameter requires that one
know the parameters that can be overridden?
A: Regular parameters require
that one know the parameters that can be overridden, such as step names within
the procedure, the DDnames of the statements overridden, and the order of the DD
statements.
Q: How is a symbolic parameter coded?
A: A symbolic
parameter is preceded by an ampersand (&) and followed by a name
(&FIRST). The first character must be alphabetic. Symbolic parameters can be
coded only in the operand field of the JCL statements; they cannot appear in the
name or operation field of the JCL statements. If more than one value is
assigned to the symbolic parameters on a PROC or EXEC statement, only the first
one is used. Symbolic parameters may be coded in any order on the PROC or EXEC
statement.
Q: How are values assigned to symbolic parameter?
A:
Values can be assigned to symbolic parameter on the PROC statement, on the EXEC
statement, or on a SET command. Values containing special characters other than
blank must be enclosed in apostrophes. The Values assigned to symbolic parameter
can be of any length, but it cannot be continued onto another line.
Q:
Can symbolic parameter concatenated?
A: Symbolic parameter can be
concatenated with other symbolic parameters, regular parameter or with the
portions of the regular parameters as follows
Symbolic/symbolic –
PARM-&FIRST&LAST
Symbolic/regular –
SPACE-&SPACES
Symbolic/portion – SPACE-CTRK, &PRIMARY
Q:
What are some of the rules involved in overriding parameters on the EXEC
statements in a procedure?
A: To override EXEC parameter one should
follow these rules
1. A PGM parameter cannot be overridden.
2. The
parameter for each step do not need to be coded in the same order as they appear
on the procedure EXEC statement
3. To add or override a parameter on an
EXEC statement, code it as follows parameter.procstepname=value.
4. If a
parameter which does not exist is coded on the EXEC statement, the parameter
will be added
5. All parameters in each step must be coded in order: the
first step must be coded first, second step second, third step third,
etc.
Q: What are some of the rules involved in overriding DD statements
in procs?
A: The following rules apply when overriding a DD
statement:
1. DD statement overrides precede the DDname with
procstepname
2. The JCL parameter is replaced unless it does not exist on
the original statement, in which case it is added. For the DCB each sub
parameter can be overridden
3. DD statement overrides should carry
DDnames that already exist in the step they are to effect
4. DD statement
overrides must be coded preceding any added DD statement for the proc
step
5. DD override statement must be listed in the order in which they
are shown in the proc
6. DD override statement are only in effect for the
duration of the run
Q: How are concatenated DD statements in the proc
overridden?
A: Overriding concatenated DD statements requires the
following:
1. To override only the first DD statement in a concatenation,
code only one overriding DD statement
2. To override all DD statements in
a concatenation, code an overriding DD fo each concatenated DD
statement
3. The overriding concatenated DD statements must be in the
same order as the concatenated DD statement
4. Code a DDname on the first
overriding DD statements only. Leave the DDname blank on the following DD
statements.
5. To leave a concatenated statements unchanged, code its
corresponding, overriding DD statement with a blank operand field
1.6.
COMPILING, LINK EDITING AND EXECUTION
Q: What does a mainframe compiler
output in the object deck and what does the linkage editor do with it?
A:
The compiler outputs the source code into the object deck in a form to be read
by the linkage editor. The linkage editor combines the object dataset (object
deck) from the compiler with machine language code for input/output and other
tasks to create an executable load module.
Q: If a program executed
attempts to divide a number by zero, do arithmetic on a field that does not
contain numeric data, or has some other serious logic error, an abend will
occur. What is the normal response that MVS would issue?
A: MVS would
issue a “system completion code” that would indicate the nature of the problem,
dump the program’s memory area, and flush the job from the system. The dump may
be used for problem analysis. The dump is printed or stored in a dataset as
specified in the //SYSUDUMP DD statement. If //SYSUDUMP is omitted, MVS will
provide the completion code value, but not the dump.
Q: Where must load
module(s) reside?
A: Load module(s) must reside on a Partitioned DataSet
(PDS).
Q What are some of the common linkage editor options and what do
they mean?
A: Some of the commonly used linkage editor options
are
1. LIST – Lists the linkage editor control statements and is usually
specified. Omit the parameter if no linking is declared.
2. MAP –
Produces a storage map showing the length and relative locations of all control
sections. Default is NOMAP.
3. XREF – Includes MAP plus a cross-reference
table of the load module (MAP and XREF are mutually exclusive)
4. NOCALL
- Cancels the automatic library call mechanism. NOCALL is used for creating
subroutine libraries so that the load module contains a single subroutine. CALL
is the default.
5. LET – Marks load modules as executable even if minor
errors are found. NOLET is the default.
6. PRINT – Allows the messages to
be written to a SYSOUT DD statement and it is the default. NOPRINT suppresses
the message.
7. AMODE – Specifies whether the program uses 24 or 31- bit
addressing. AMODE ANY specifies both 24 and 31 – bit addressing. AMODE 24
requires the program to run below the 16-meg line. The default is established by
the compiler and is usually AMODE 24.
8. RMODE – Indicates where the
program can reside in virtual storage. RMODE ANY allows the program to reside
above the 16-meg line and requires AMODE 31 or AMODE ANY. RMODE 24 requires the
program to reside below the 16-meg line. The default is established by the
compiler and is usually RMODE 24.
9. TERM – Causes linkage editor
diagnostic message to be written to a SYSTERM DD statement. NOTERM is the
default.
Q: What causes the message ‘MODULE HAS BEEN MARKED
NOT
EXECUTABLE’?
A: An unresolved external reference often causes
the message ‘MODULE HAS BEEN MARKED NOT EXECUTABLE’. Although the module is not
executable, one may be able to recover by link-editing the control section
causing the problem and replacing it in the load module.
Q: Why would the
linkage editor add a member to a load library under the name
‘TEMPNAME’?
A: The linkage editor will add a member to the load library
under the name of ‘TEMPNAME’ when a member of the same name already exist on the
library and the disposition on the SYSLMOD statement was coded as DISP = MOD.
This indicates a problem and need s to be resolved.
1.7.
UTILITIES
Q: What is an IEBGENER used for?
A: IEBGENER is a
dataset utility used to copy sequential datasets, produce a partitioned dataset
or member from a sequential dataset, produce an edited sequential or partitioned
dataset, and reblock / change the logical record length of a dataset.
Q:
What is an IEBCOPY used for?
A: IEBCOPY is a dataset utility used to copy
one or more partitioned datasets or to merge partitioned datasets. A partitioned
dataset that is copied to a sequential dataset is said to be unloaded. When one
or more dataset created by an unload operation are used to recreate a
partitioned dataset, it is called a load operation. Specific members of a
partitioned or unloaded dataset can be selected for, or excluded from, a copy,
unload or load process.
Q: What is an IEFBR14 used for?
A: IEFBR14
is used to delete datasets, find dataset, catalog, and uncatalog
datasets.
Q: What is an IEHLIST used for?
A: IEHLIST is a system
utility used to list entries in an OS CVOL, entries in the directory of one or
more partitioned datasets, or entries in an indexed or nonindexed volume table
of contents (VTOC).
Q: What is an IEHINIT used for?
A: IEHINIT is
a system utility used to write an IBM volume label onto any number of magnetic
tapes mounted on one or more tape units. Each volume label set created by this
program contains a standard volume label, and 80-byte dummy header and a
tapemark.
Q: What is an IEBPTPCH used for?
A: IEBPTPCH is a
dataset utility used to print or punch all or selected, portions of a sequential
or partitioned dataset. Records can be printed or punched to meet either
standard specifications or user specification.
Q: What is an IEBUPDTE
used for?
A: IEBUPDTE is a dataset utility used to create and update
dataset libraries, modify existing partitioned members or sequential dataset and
change the organization of dataset from sequential to partitioned or Vice
Versa.
Q: What utility can be both used for VSAM and NON VSAM
files?
A: IDCAMS utility is used to handle VSAM and NON VSAM
files.
Q: Which parameter is required to copy the dataset using
IEBCOPY?
A: The parameter “COPY” is required to indicate one or more
IEBCOPY copy, unload or load operations. Any number of operations can follow a
single COPY statement and any number of COPY statements can appear within a
single job step.
Q: What is the parameter ‘GENERATE‘ used for on utility
IEBGENER?
A: The parameter ‘GENERATE’ for the utility IEBGENER is used
when output is to be partitioned, editing is to be performed or user routines
are provided and / or label processing is specified.
Q: What is the
parameter ‘MEMBER’ used for an utility IEBGENER?
A: The parameter
‘MEMBER’ for the utility IEBGENR is used when the output is to be partitioned.
One member statement must be included for each member to be created by IEBGENER.
ALL RECORD statements following a MEMBER statement pertain to the number named
in that MEMBER statement.
Q: What is the parameter ‘RECORD’ used for on
utility IEBGENER?
A: The parameter ‘RECORD’ for the utility IEBGENER is
used to define a record group and to supply editing information. A record group
consists of records that are to be processed identically.
Q: Which
utility uses the ‘REPRO’ command and what function does it perform?
A:
The utility IDCAMS uses the ‘REPRO’ command. The REPRO command copies sequential
datasets. It performs much the same function as IEBGENER.
Q: How does one
verify that a utility has ended normally?
A: To verify if a utility has
ended normally, one must check the JCL for a return code of zero. Various
utilities generate return codes of 0004, 0008, 0012 and higher, in increments of
4, when problems or unusual conditions have been encountered.
Q: When a
utility ends with a nonzero return code, what must be done to resolve the
problem?
A: When a utility ends with a nonzero return code, it is
necessary to determine what caused the error. One may start by checking for
error message generated by the utility and look them upon on a utility messages
manual. Also, the JCL statements and / or control statements should be checked
to make sure they were properly coded. Once the error has been identified, it
should be fixed and the job resubmitted.
Q: What are the kinds of job
control statements?
A: The JOB, EXEC and DD statement.
Q: What is
the meaning of keyword in JCL? What is its opposite?
A: A keyword in a
JCL statement may appear in different places and is recognized by its name, e.g.
MSGCLASS in the JOB statement. The opposite is positional words, where their
meaning is based on their position in the statement, e.g. in the DISP keyword
the =(NEW, CATLG, DELETE) meanings are based on first, second and third
position.
Q: Describe the JOB statement, its meaning, syntax and
significant keywords.
A: The JOB statement is the first in a JCL stream.
Its format is // jobname, keyword JOB, accounting information in brackets and
keywords, MSGCLASS, MSGLEVEL, NOTIFIY, CLASS, etc.
Q: Describe the EXEC
statement, its meaning, syntax and keywords.
A: The EXEC statement
identifies the program to be executed via a PGM=program name keyword. Its format
is //jobname EXEC PGM=program name. The PARM= keyword can be used to pass
external values to the executing program.
Q: Describe the DD statement,
its meaning, syntax and keywords.
A: The DD statement links the external
dataset name (DSN) to the DDNAME coded within the executing program. It links
the file names within the program code to the file names know to the MVS
operating system.
The syntax is // DDname DD DSN=dataset name. Other
keywords after DSN are DISP, DCB, SPACE, etc.
Q: What is a PROC? What is
the difference between an instream and a catalogued PROC?
A: PROC stands
for procedure. It is 'canned' JCL invoked by a PROC statement. An instream PROC
is presented within the JCL; a catalogued PROC is referenced from a proclib
partitioned dataset.
Q: What is the difference between a symbolic and an
override in executing a PROC?
A: A symbolic is a PROC placeholder; the
value for the symbolic is supplied when the PROC is invoked, eg.
&symbol=value. An override replaces the PROC's statement with another one;
it substitutes for the entire statement.
Q: What is RESTART? How is it
invoked?
A: RESTART is a JOB statement keyword. It is used to restart the
job at a specified step rather than at the beginning.
Q: What is a GDG?
How is it referenced? How is it defined? What is a MODELDSCB?
A: GDG
stands for generation data group. It is a dataset with versions that can be
referenced absolutely or relatively. It is defined by an IDCAMS define
generation datagroup execution.
Q: Explain concatenating
datasets.
A: Datasets can be grouped in a DD statement one after another,
eg. in a JOBLIB statement where the load module can exist in one of many
datasets.
Q: What is the difference between specifying DISP=OLD and
DISP=SHR for a dataset?
A: DISP=OLD denotes exclusive control of the
dataset; DISP=SHR means there is no exclusivity.
Q: What is MOD and when
would you use it?
A: DISP=MOD is used when the dataset can be extended,
ie, you can add records at the end of an existing dataset.
Q: What are
the keywords associated with DCB? How can you specify DCB information? What is
the OS precedence for obtaining that DCB information, ie. where does the system
look for it first?
A: The keywords associated with the DCB parameter are
LRECL, RECFM, BLKSIZE and DSORG.
The DCB information can be supplied in
the DD statement. The sysem looks for DCB information in the program code
first.
Q: How do you designate a comment in JCL?
A: The comment
statement is //* followed by the comments.
Q: What is the meaning of the
EXEC statement keyword, COND? What is its syntax?
A: COND specifies the
conditions for executing the subsequent job step. The value after the COND= is
compared to the return codes of the preceding steps and if the comparison is
true, the step is bypassed.
Q: What is the improvement to COND= in the
latest version of MVS?
A: MVS now allows for an IF bracketed by an END IF
around any job step to replace the COND= syntax. Again, if the IF statement is
true, the step is bypassed.
Q: What is the purpose of the PARM keyword in
the EXEC statement?
A: The value after the PARM= specifies control
information to be passed to the executing program of the job step.
Q:
What is the purpose and meaning of the REGION keyword and what JCL statement is
it associated with?
A: REGION specifies the maximum CPU memory allocated
for a particular job or job step. If REGION is in the JOB card, it relates to
the entire job; if in the EXEC statement, it relates to the job step.
Q:
What is the purpose and meaning of the TIME keyword and what JCL statement is it
associated with?
A: TIME specifies the maximum CPU time allocated for a
particular job or job step. If TIME is in the JOB card, it relates to the entire
job; if in the EXEC statement, it relates to the job step.
Q: What is the
meaning of data definition name (ddname) and dataset name (dsname) in the DD
statement?
A: Data definition name is the eight character designation
after the // of the DD statement. It matches the internal name specified in the
steps executing program. In COBOL that's the name specified after the ASSIGN in
the SELECT ASSIGN statement. Dataset name is the operating system (MVS) name for
the file.
Q: How is the keyword DUMMY used in JCL?
A: For an
output file DUMMY specifies that the output is to be discarded. For input it
specifies that the file is empty.
Q: What does the keyword DCB mean and
what are some of the keywords associated with it?
A: DCB stands for data
control block; it is a keyword for the DD statement used to describe datasets.
Keywords associated with it are BLKSIZE, DEN, LRECL and RECFM.
Q: What is
the difference between BLKSIZE and LRECL?
A: BLKSIZE specifies the number
of bytes.
1.8. JCL UTILITIES
Some common utilities used:
SL
no
Utility
Function
1
IEBGENER
·
Copy one sequential file to another
· Create datasets with input dataset
as DUMMY
2
IEBCOPY
· Copy the partitioned
datasets
· Compress the partitioned datasets
· Include members of
PDS within a copy transaction
· Exclude members of PDS with in a copy
transaction
3
IEHPROGM
· Catalog datasets
·
Un-catalog datasets
· Rename the datasets
· Create the index for a
generation data groups
· Delete the Index for a generation data
groups
4
IEBCOMPR
· Compare two partitioned
datasets
· Compare two sequential
datasets
5
IEFBR14
· Create a empty
dataset
6
IEEPROGM
· Create generation data
groups
1.9. ABEND CODES
SL
No
Codes
Explanation
1
S0C4
Caused
by the subscript being out of range
2
S0C5
Caused
by invalid address specification. i.e. The address points to an instruction,
control word or data outside the available real
storage
3
S0C7
Caused by a bad data. i.e. Data
exception. When we are moving an alphanumeric field to a numeric computational
field this Abend occurs. The result is an Abend
failure
4
S222
Caused by a job being cancelled by
the operator, due to a request by the program for an unavailable
resource.
5
S237
Caused by end of volume being
encountered.
6
S322
Caused when CPU time assigned
to the job, job step, or procedure has been exceeded. i.e. Time out
error.
7
S413
This abend occurs if the DD statement
referenced by UNIT=AFF statement is not closed before the DD statement that
comes before it.
8
S522
Caused when a wait state
exceeds an installation-defined time
limit.
9
SB37
Caused by lack of sufficient
Secondary space
10
SD37
Caused by lack of
sufficient Primary space
11
SE37
Caused by lack of
space for PDS (Partitioned data set)
Microsoft Technologies,Sap-Modules,Java,IBM-MainFrames,Siebel,Testing,DataBase,PHP, Bpo,Callcenter and Freshers Interview Questions.
Showing posts with label IBM-MAINFRAME-JCL. Show all posts
Showing posts with label IBM-MAINFRAME-JCL. Show all posts
JCL2 interview questions
Q: What are S0C1,
S0C4, S0C5, S0C7 ABENDs??
A: S0C1 (Operation Exception Error) - May be due to
Missing or misspelled DD name
Read/Write to unopened dataset
Reading a dataset opened output mode
Writing into a dataset opened input mode
Called subprogram not found
S0C4 may be due to
Missing Select statement (during compile)
Bad Subscript/index
Protection Exception
Missing parameters on called subprogram
Read/Write to unopened file
Move data from/to unopened file;
S0C5 May be due to
Bad Subscript/index
Close an unopened dataset
Bad exit from a perform
Access to I/O area (FD) before read;
S0C7 may be due to
Numeric operation on non-numeric data
Un-initialized working storage
Coding past the maximum allowed subscript
S0CB might be due to 1.Division by Zero
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: 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 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
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.
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?
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. 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]
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.
A: S0C1 (Operation Exception Error) - May be due to
Missing or misspelled DD name
Read/Write to unopened dataset
Reading a dataset opened output mode
Writing into a dataset opened input mode
Called subprogram not found
S0C4 may be due to
Missing Select statement (during compile)
Bad Subscript/index
Protection Exception
Missing parameters on called subprogram
Read/Write to unopened file
Move data from/to unopened file;
S0C5 May be due to
Bad Subscript/index
Close an unopened dataset
Bad exit from a perform
Access to I/O area (FD) before read;
S0C7 may be due to
Numeric operation on non-numeric data
Un-initialized working storage
Coding past the maximum allowed subscript
S0CB might be due to 1.Division by Zero
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: 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 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
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.
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?
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. 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]
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.
JCL interview questions
|
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?
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?
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?
Need to
supply volume serial no. VOL=SER=xxxx.
7. 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
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 .
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?
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?
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?
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.
14. How
do you override a specific DDNAME/SYSIN in PROC from a JCL?
//<stepname.dd>
DSN=...
15. 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 data set and going to the volume where the
new dataset exists(this info is in the msglog of the job) and cataloging it.
16. What
is 'S0C7' abend?
Caused
by invalid data in a numeric field.
17. What
is a S0C4 error ?
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.
18. 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.
19. 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.
20. Why
do you want to specify the REGION parameter in a JCL step?
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.
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.
22. What
is COND=EVEN ?
Means
execute this step even if any of the previous steps, terminated abnormally.
23. What
is COND=ONLY ?
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?
TYPERUN=SCAN
on the JOB card or use JSCAN.
25. 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.
26. 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.
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
/*
29. Can
you code instream data in a PROC ?
No.
30. 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.
31. 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(...)
/*
32. 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.
33. 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.
34. What
happens if both JOBLIB & STEPLIB is specified ?
JOBLIB
is ignored.
35. When
you specify mutiple datasets in a JOBLIB or STEPLIB, what factor determines
the order?
The
library with the largest block size should be the first one.
36. How
to change default proclib ?
//ABCD
JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB)
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.
38. What
are the valid DSORG values ?
PS -
QSAM, PO - Partitioned, IS - ISAM
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.
?????
Can anyone add more
|
Top of F
Subscribe to:
Posts (Atom)