Page 1 of 1

DL1 status code GB - end of database

PostPosted: Mon Aug 29, 2011 6:15 pm
by Mike1304
Hi,

I' doing a GU on a secondary index for a root with operation >=.
DL1 retuns a GE.
My expectation was, to get a GB.

Why does DL1 retur a GE?
- because I read over secondary index?
- because I use a GU and DL1 return GB only after a GN?
- because ...????

thanks in advance

Mike
PS: how can I find such special information in the IBM documenatation?

Re: DL1 status code GB - end of database

PostPosted: Mon Aug 29, 2011 7:29 pm
by Ed Goodman
In my "IMS V9 Application Programming: Database Manager" book, I found this:

If IMS is unable to find the lowest segment your program has requested, it returns a GE (not-found) status code, just as it does if your program does not use the D command code and IMS is unable to find the segment your program has requested. This is true even if IMS reaches the end of the database before finding the lowest segment your program requested. If IMS reaches the end of the database without satisfying any levels of a path call, it returns a GB (end of database) status code. However, if IMS returns one or more segments to your I/O area (new segments for which there was no current position at the start of the current call), and if IMS is unable to find the lowest requested segment, IMS returns a GE status code, even if it has reached the end of the database.


It's specific to path calls...

I would always check for either GE or GB.

I went through my V9 manuals and I can NOT find any single tale that lists all the status codes that can be returned for a give DL/I call.

Re: DL1 status code GB - end of database

PostPosted: Wed Apr 24, 2013 2:46 am
by pmartyn
Why would you expect a GB on a GU call? No offense but that does not make sense. If you issue a GU (Get Unique) call and it is not there you will receive a GE - Segment Not Found. However, different processing parameters exist for the other types of access such as the PATH call mentioned in Ed's reply. Under those conditions I woud use Ed's recommendation and check for both the GB and GE.