IMS DB: quick Tutorial on GU and GHU calls

GU CALLUsed to retrieve a specific segment occurrence independent of the current position within the database Qualified SSAs identifying each hierarchical level are normally provided.

A GET UNIQUE call with missing levels of qualification uses current control block information for missing levels. If none exist, unqualified SSAs are assumed for the missing levels.

A GET UNIQUE call always returns the first segment in the database that satisfies the qualification
‘GE’ – Segment not found
‘bb’ – Successful call

IMS DB calls
Image courtesy|

Get Hold callReplace and Delete Call-Function Code: ‘REPL ‘ and ‘DLET’. Used to replace and delete the specified segment

Read With Hold is necessary before you work on with these calls.


While replacing, key portion cannot be modified. For delete call do not move anything into segment area.

(here no need to specify qualification)

REPL & DLET must be preceded by HOLD call. Otherwise IMS will give you the return code ‘DA’, ‘DJ’.

Other way of using DLET command

GHU       EMPSEG(EMPNO=123456)
GHN       PRSEG---*L  => go for last PRSEG
                  *F  =>go for first PRSEG

 * indicates Command Code Follows

 -,-,-Three spaces

Also Read

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.