1

I would like to know what calls in IMS need to be made before going for GHNP call. My application cobol code has GU, GHU calls before going for GHNP call. Is it mandatory to have those calls before going for GHNP function

piet.t
  • 11,718
  • 21
  • 43
  • 52
Mahi
  • 11
  • 1

1 Answers1

3

Note that GN means "get next", so all GN-type calls (GN,GNP,GHN,GHNP) depend on your current position in the database. Without any previous calls the position is undefined and so would be the result of your GN-call.

So to get a well defined result you have to issue a statement to establish a well-defined position in your database - and usually this is a GU-Type ("get unique") call. It can also be an ISRT ("insert") as this results in a defined position as well. But usually your application-logic should show you the way to go.

piet.t
  • 11,718
  • 21
  • 43
  • 52