IMS DB Interview Questions (41 - 50)

41. What are Command Codes?

Command codes are special instructions embedded within DL/I (Data Language/I) calls that modify the behavior of database operations. For example -

  • C (Concatenated Key) β†’ Combines multiple fields for searching.
  • D (Path Call) β†’ Retrieves a full hierarchical path.
  • F (First Occurrence) β†’ Gets the first segment only.

42. What is a message queue?

A temporary storage area where IMS holds incoming transaction requests before processing. For example - When you withdraw money from an ATM, your request goes into a queue before IMS processes it.

43. What is a Database Block in IMS DB?

A database block (or block) is the smallest unit of data that IMS transfers between disk and memory. It contains one or more segments (records) from the database.

44. What is the function of a GU call?

GU (Get Unique) is a call used to fetch a specific segment (record) from the IMS database. It retrieves only one segment based on the search criteria (like a key).

45. What is the syntax of a GU call in IMS DB?

CALL 'CBLTDLI' USING GU, PCB-Name, IO-Area, SSA1, SSA2, ...
  • GU: Operation code (Get Unique).
  • PCB-Name: Program Communication Block (defines the database view).
  • IO-Area: Where the retrieved data is stored.
  • SSA1, SSA2, ...: Optional Segment Search Arguments (conditions to find the segment).

46. What is the function of a GHU call?

GHU (Get Hold Unique) works like GU but also locks the segment for update/delete. It’s used before REPL (replace) or DLET (delete) to prevent others from changing the data while you work on it.

47. What is an ISRT call in IMS DB?

ISRT (Insert) adds a new segment (record) to the database. You must provide the data in the IO-Area and specify where to insert it using SSAs (e.g., under a parent segment).

48. What is a PSB override in IMS DB?

A PSB (Program Specification Block) Override occurs when an application program specifies different processing options or access paths than those defined in the original PSB.

49. What is a secondary index?

A secondary index is an alternate way to access segments (records) in IMS, other than the primary key. For example - if the primary key is CUSTID, a secondary index could be CUSTNAME to allow searching by name.

50. What is the role of the database recovery control program (DBRC)?

DBRC (Database Recovery Control) manages IMS database recovery, logging, and backups. It:

  • Tracks changes in logs for recovery.
  • Coordinates backups.
  • Ensures data consistency if a failure occurs.