GHNP


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

DB PCB:


  • Database Program Control Block
  • Specifies the DB PCB for the GHNP call.
  • DB PCB will act as an input and output parameter.

AIB:


  • Known as Application Interface Block.
  • Specifies the AIB for the call.
  • AIB parameter is an input and output parameter.
  • If AIB using in the GHNP call, all the below fields must be initialized in the AIB - AIBID, AIBLEN, AIBRSNM1, AIBOALEN.

I/O AREA:


  • Known as Input-Output Area.
  • Specifies the I/O area in GHNP Call.
  • I/O Area parameter is an output parameter.
  • If Replace 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.

SSA:


  • 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 GHNP call.

RSA:


  • 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 GHNP call.