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:

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.

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.

Two or more segment occurrences of a particular segment type under a single parent segment occurrence are called twin segments.

A segment occurrence is an individual segment of a particular type containing user data.

Each occurrence of the root segment plus all its subordinate segment occurrences make up for one database record.

We can have 15 levels in a DL/I database.

A DL/I database can have 255 segment types.

There are two control blocks: the Database Descriptor (DBD) and Program Specification Block (PSB).

The common functions are GU, GN, GNP, GHU, GHN, REPL, ISRT, and DLET.

Command codes extend the function of an SSA call. They simplify programming and improve performance.

Procopt parameter specifies PROCESSING OPTIONS that define the type of processing performed on a segment.

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.

The field that is used to retrieve the data is known as a search field.

A Goback statement is used to pass the control back to the IMS control program.

A Call statement is used to request for DL/I services such as performing certain operations on the IMS database.

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

'GHU' or Get Hold Unique specifies that we are going to update a segment after retrieval. GHU corresponds to the GU call.

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.

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.

Entry statement is the first statement after the procedure division.

We receive spaces after a successful call.

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.

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.

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.

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.

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.

A checkpoint is a stage where the modifications done to a database by an application program are considered complete and accurate.

IMS DB processing is very fast as compared to DB2.

IMS predefined tree structure reduces flexibility and it is difficult to manage.

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.

Data can be processed in both the ways: Sequential & Random.

Predefined pattern for accessing data in DL/I is first down the hierarchy, then left to right.

TYPE=P specifies Packed decimal data type for the field which we have declared.

TYPE=X specifies Hexadecimal data type for the field which we have declared.

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.

The LANG parameter specifies the language in which the application program is written, e.g., COBOL.

GOBACK is used to pass the control back to the IMS control program.

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

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

'CHKP' code is used for the Checkpoint function. It is used in the recovery features of IMS.

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.

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.

An unqualified SSA provides the name of the segment being used inside the call.

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.

Command code is coded at the tenth position.

If a call is successful you will get spaces in STATUS-CODE field.

This statement is incorrect as Multiple PCBs can be defined for a single database.

This statement is incorrect as a program can maintain multiple positions in a database using a single PCB.

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.

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 :-)