IMS-DB Interview Questions
Dear readers, these IMS-DB Interview Questions
have been designed specially to get you acquainted
with the nature of questions you may encounter
during your interview for the subject of IMS-DB. As
per my experience good interviewers hardly plan to
ask any particular question during your interview,
normally questions start with some basic concept of
the subject and later they continue based on further
discussion and what you answer:
What is a hierarchy path?
Hierarchy path is a line that starts at the root, passes
through the intermediate levels in the hierarchy, and
ends at a segment at the bottom of the hierarchy.
What is a root segment?
A segment that lies at the top of the hierarchy is
called the root segment. It is the only segment
through which all dependent segments are accessed.
What are twin segments?
Two or more segment occurrences of a particular
segment type under a single parent segment
occurrence are called twin segments.
Define segment occurrence.
A segment occurrence is an individual segment of a
particular type containing user data.
What is a database record?
Each occurrence of the root segment plus all its
subordinate segment occurrences make up for one
database record.
What is the limitation on the number
of levels in a DL/I database?
We can have 15 levels in a DL/I database.
How many segment types can you
have in a DL/I database?
A DL/I database can have 255 segment types.
What are the control blocks in IMS?
There are two control blocks: the Database
Descriptor (DBD) and Program Specification Block
(PSB).
What are common DLI functions?
The common functions are GU, GN, GNP, GHU, GHN,
REPL, ISRT, and DLET.
What are the command codes and
their purposes?
Command codes extend the function of an SSA call.
They simplify programming and improve
performance.
What is the use of PROCOPT?
Procopt parameter specifies PROCESSING OPTIONS
that define the type of processing performed on a
segment.
What is multi-positioning?
Multi-positioning is an option whereby the IMS
maintains a separate position on each hierarchical
path. When more than one PCBs refer to the same
DBD, it is called multi-positioning.
Define a search field.
The field that is used to retrieve the data is known as
a search field.
What is a GOBACK statement?
A Goback statement is used to pass the control back
to the IMS control program.
Define a call statement.
A Call statement is used to request for DL/I services
such as performing certain operations on the IMS
database.
What is the function of a GU call?
'GU' or Get Unique works similar to the random read
statement in COBOL. It is used to fetch a particular
segment occurrence based on the field values which
can be provided using Segment Search Arguments.
What is the function of a GHU call?
'GHU' or Get Hold Unique specifies that we are going
to update a segment after retrieval. GHU corresponds
to the GU call.
What is the function of SSA?
SSA is known as Segment Search Arguments. SSA is
an optional parameter. It is used to identify the
segment occurrence being accessed. We can include
any number of SSAs depending on the requirement.
Explain index pointer segment.
DL/I stores the pointer to segments of the indexed
database in a separate database. Index pointer
segment is the only type of secondary index.
Which is the first statement in
COBOL-IMS programs?
Entry statement is the first statement after the
procedure division.
What is the return code you get after
a successful IMS call?
We receive spaces after a successful call.
What is the use of Sparse
Sequencing?
We can remove some of the index source segments
from the index using sparse sequencing with
secondary index database. Sparse sequencing is
used to improve the performance. When some
occurrences of the index source segment are not
used, we can remove that. Sparse sequencing is also
known as Sparse Indexing.
Explain Logical relationship.
A logical relationship is a path between two
segments related logically and not physically. Usually
a logical relationship is established between separate
databases. But it is possible to have a relationship
between the segments of one particular database.
What are logical twins?
Logical twins are the occurrences of a logical child
segment type that are subordinates to a single
occurrence of the logical parent segment. DL/I
makes the logical child segment appear like an actual
physical child segment. This is also known as virtual
logical child segment.
What is a concatenated segment?
A logical child segment always begins with the
complete concatenated key of the destination parent.
This is known as Destination Parent Concatenated
Key (DPCK). Always code the DPCK at the start of
your segment I/O area for a logical child. In a logical
database, the concatenated segment makes the
connection between segments that are defined in
different physical databases.
Explain DL/I log.
When an application program abnormally ends, it is
necessary to revert the changes done by the
application program, correct the errors, and re-
execute it. To do this procedure, it is required to have
the DL/I log.
What is a checkpoint?
A checkpoint is a stage where the modifications done
to a database by an application program are
considered complete and accurate.
Which database processing is very
fast?
IMS DB processing is very fast as compared to DB2.
Which database is difficult to
manage?
IMS predefined tree structure reduces flexibility and it
is difficult to manage.
Through which segment all
dependent segments are accessed?
A segment that lies at the top of the hierarchy is
called the root segment. It is the only segment
through which all dependent segments are accessed.
How can we access the data in IMS
DB?
Data can be processed in both the ways: Sequential &
Random.
What is the predefined pattern for
sequential processing?
Predefined pattern for accessing data in DL/I is first
down the hierarchy, then left to right.
For FIELD macro statement in
DBDGEN, what does TYPE=P
parameter specifies?
TYPE=P specifies Packed decimal data type for the
field which we have declared.
For FIELD macro statement in
DBDGEN, what does TYPE=X
parameter specifies?
TYPE=X specifies Hexadecimal data type for the field
which we have declared.
What does SENSEG stands for?
SENSEG is known as Segment Level Sensitivity. It
defines the program's access to parts of the
database and it is identified at the segment level.
Which parameter specifies the
language in which the application
program is written in PSBGEN?
The LANG parameter specifies the language in which
the application program is written, e.g., COBOL.
Which is used to pass the control
back to the IMS control program?
GOBACK is used to pass the control back to the IMS
control program.
Which function is used to get a
unique record for update purpose?
'GHU' code is used for Get Hold Unique. Hold function
specifies that we are going to update the segment
after retrieval. The Get Hold Unique function
corresponds to the Get Unique call.
Which function is used to retrieve
segment occurrences in sequence
subordinate to an established parent
segment?
'GNP' code is used for Get Next within Parent. This
function is used to retrieve segment occurrences in
sequence subordinate to an established parent
segment.
Which function is used for
recovering the database?
'CHKP' code is used for the Checkpoint function. It is
used in the recovery features of IMS.
In PCB which field is used to store
the level of the segment that was
processed?
Segment level is known as Segment Hierarchy Level
Indicator. It contains character data and is two bytes
long. A segment level field stores the level of the
segment that was processed. When a segment is
retrieved successfully, the level number of the
retrieved segment is stored here.
In PCB which field stores the area for
its own internal linkage related to an
application program?
Reserved DL/I is known as the reserved area of the
IMS. It stores four bytes binary data. IMS uses this
area for its own internal linkage related to an
application program.
Which SSA provides the name of the
segment being used inside the call?
An unqualified SSA provides the name of the
segment being used inside the call.
What is the length of an unqualified
SSA?
A basic unqualified SSA is 9 bytes long. The first 8
bytes hold the segment name which is being used for
processing. The last byte always contains space.
Where do we code command code in
a qualified SSA?
Command code is coded at the tenth position.
If a call is successful what value you
will get in STATUS-CODE field?
If a call is successful you will get spaces in STATUS-
CODE field.
Multiple PCBs can not be defined for
a single database. State whether
true or false?
This statement is incorrect as Multiple PCBs can be
defined for a single database.
It is not possible for a program to
maintain multiple positions in a
database using a single PCB. State
whether true or false?
This statement is incorrect as a program can
maintain multiple positions in a database using a
single PCB.
For Bidirectional Virtual relationship
the logical connection goes from the
logical child to the logical parent and
it cannot go the other way around.
State whether true or false?
This statement is wrong as Bidirectional Virtual
relationship allows access in both the directions. The
logical child in its physical structure and the
corresponding virtual logical child can be seen as
paired segments.
What does MPP stands for?
MPP stands for Message Processing Program.
What is Next ?
Further you can go through your past assignments
you have done with the subject and make sure you
are able to speak confidently on them. If you are
fresher then interviewer does not expect you will
answer very complex questions, rather you have to
make your basics concepts very strong.
Second it really doesn't matter much if you could not
answer few questions but it matters that whatever
you answered, you must have answered with
confidence. So just feel confident during your
interview. We at tutorialspoint wish you best luck to
have a good interviewer and all the very best for your
future endeavor. Cheers :-)