The Advanced Guide to GU And GHU Calls read now

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
STATUS CODES:
‘GE’ – Segment not found
‘bb’ – Successful call

IMS DB calls
Image courtesy|Stocknsnap.io

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.

GHU, GHN, GHNP.

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

GHU  EMPSEG (EMPNO=123456)
DLET
(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
DLET

 * indicates Command Code Follows

 -,-,-Three spaces


Also Read

Advertisements

Author: Srini

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