IMS DB Realtime (Scenario based) Interview Questions (41 - 50)
41. If a call is successful, what value will you get in the STATUS-CODE field?
A successful IMS call returns spaces (blank) in the STATUS-CODE field of the PCB. For example -
STATUS-CODE = ' ' (4 spaces)
- GB = Segment not found
- GE = End of database
42. Multiple PCBs can not be defined for a single database. State whether true or false?
False. You can define multiple PCBs for the same database in a PSB to give programs different views/access rights.
43. It is not possible for a program to maintain multiple positions in a database using a single PCB. State whether true or false?
False. A single PCB supports multi-positioning (tracking multiple locations) using: Command codes (e.g., N for next segment), Multiple calls (e.g., GU followed by GN).
44. 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?
False. Bidirectional Virtual Relationships allow navigation both ways: Logical Child → Logical Parent and Logical Parent → Logical Child.
45. What is the difference between a full backup and an incremental backup?
Full Backup | Incremental Backup |
---|---|
Copies entire database every time. | Only backs up changes since last backup. |
Slower but simpler to restore. | Faster but requires all increments to restore. |
Example: Weekly full backup. | Example: Daily incremental backups. |
46. What is the maximum number of segment types allowed for a single database?
A single IMS database can have up to 255 segment types. For example - A SCHOOL database may have segments like STUDENT, TEACHER, CLASS, etc.
47. How do you run a COBOL program that uses DL/I?
- Compile the COBOL program (with IMS-specific code like ENTRY 'DLITCBL').
- Link-edit with IMS libraries (e.g., DFSRESL).
- Run via JCL (Job Control Language)
- IMS schedules and executes the program.
48. Why use GOBACK instead of STOP RUN in IMS/COBOL programs?
Always use GOBACK in IMS programs.
- GOBACK:Returns control to IMS (allowing it to manage transactions and resources). It ensures proper synchronization points (like COMMIT/ROLLBACK).
- STOP RUN: Terminates the program abruptly, which can cause resource leaks or incomplete transactions.
49. How does DL/I know that an SSA is qualified or not?
DL/I checks the format of the SSA (Segment Search Argument):
- Unqualified SSA: Just the segment name (e.g., 'EMPLOYEE').
- Qualified SSA: Segment name + condition in parentheses (e.g., 'EMPLOYEE(EMPID="123")').
50. How do you establish parentage on a segment occurrence?
Use ISRT (Insert) with the parent segment's key in the SSA. For example -
ISRT DEPARTMENT(DEPTID='D01'), EMPLOYEE (data...)
This inserts an EMPLOYEE segment under the DEPARTMENT with DEPTID='D01'.