IMS DB Get Hold Next within Parent Call
Known as Get Hold Next Within Parent.
To retrieve and hold the next dependent segment of this parent.
Retrieval for the GHNP call is the same as for the GHN call.
The only difference between GNP and GHNP is holding a record for update.
CALL ‘CBLTDLI’ USING GHNP db pcb/aib i/o area ssa/rsa
Lets discuss about individual parameters.
- Database Program Control Block
- Specifies the DB PCB for the GN call.
- DB PCB will act as an input and output parameter.
- Known as Application Interface Block.
- Specifies the AIB for the call.
- AIB parameter is an input and output parameter.
- If AIB using in the GN call, all the below fields must be initialized in the AIB
AIBID, AIBLEN, AIBRSNM1, AIBOALEN
- Known as Input-Output Area.
- Specifies the I/O area in GN Call.
- I/O Area parameter is an output parameter.
- If Get Hold Next within Parent calls completed successfully, IMS returns the requested segment in I/O area.
- If any path calls issued from the application program, the I/O area must be long enough to hold the longest path of concatenated segments.
- I/O area always contains left-justified segment data.
- The I/O area points to the first byte of this area.
- Known as Segment Search Arguments.
- Specifies to be used in the call.
- SSA parameter is an input parameter.
- The SSA supplies in the call to data areas in the application program where the SSA has been defined for the call.
- Up to 15 SSAs can be used in the parameter.
- SSA parameter is optional for the GN call.
- Specifies the area in application program where the RSA for the record should be returned.
- RSA output parameter is used for GSAM only.
- RSA parameter is optional for GN call.IMSDB Get Next within Parent(GNP) IMSDB Get Unique(GU)