IMS DB Realtime (Scenario based) Interview Questions (31 - 40)
31. For FIELD macro in DBDGEN, what does TYPE=P specify?
In DBDGEN, TYPE=P defines a primary key field (used to uniquely identify a segment). For example -
FIELD NAME=EMPID,TYPE=P,LENGTH=5
Here, EMPID is the primary key for the segment.
32. For FIELD macro in DBDGEN, what does TYPE=X specify?
TYPE=X defines a secondary index field (used for alternate search paths). For example -
FIELD NAME=EMPNAME,TYPE=X,LENGTH=20
This allows searching by EMPNAME (not just the primary key).
33. Which parameter specifies the language in the PSBGEN?
The LANG=COBOL (or LANG=PL/I, LANG=ASSEMBLY) parameter in PSBGEN specifies the program language. For example -
PSBGEN LANG=COBOL,PSBNAME=MYPSB
34. Which is used to pass control back to the IMS control program?
Ends the program and lets IMS manage the next transaction.
- In COBOL: Use GOBACK to return control to IMS.
- In PL/I: Use RETURN.
35. Which function is used for recovering the database?
The ROLL function is used to undo changes and recover the database to its last consistent state. Program errors or explicit ROLL calls.
36. In PCB, which field stores the level of the segment processed?
The LEVEL field in the PCB stores the hierarchy level (e.g., 01 for root, 02 for child) of the last processed segment. For example - If EMPLOYEE is level 2, PCB shows LEVEL=02 after processing it.
37. In PCB, which field stores internal linkage info for the program?
The PROCOPT (Processing Options) field in the PCB defines what the program can do (e.g., G for Get, I for Insert). For example - PROCOPT=G means the program can only retrieve data.
38. Which SSA provides the segment name used in a call?
The Unqualified SSA (Segment Search Argument) specifies only the segment name (no conditions).
39. What is the length of an unqualified SSA?
An unqualified SSA (Segment Search Argument) is 8 bytes long:
- First byte: A blank space (required).
- Next 1-8 bytes: The segment name (left-aligned, padded with spaces if needed).
40. Where do we code command code in a qualified SSA?
Command codes are placed in the first byte of a qualified SSA.