DL1 status code GB - end of database

IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)
Mike1304
Posts: 36
Joined: Mon Feb 28, 2011 4:14 pm
Skillset: Programmer for over 30 year, Assembler and COBOL
Referer: found in internet

DL1 status code GB - end of database

Postby Mike1304 » Mon Aug 29, 2011 6:15 pm

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?

Ed Goodman
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Skillset: 30 years on IBM mainframes
Referer: Searched for Frank Yeager

Re: DL1 status code GB - end of database

Postby Ed Goodman » Mon Aug 29, 2011 7:29 pm

In my "IMS V9 Application Programming: Database Manager" book, I found this:

Code: Select all

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.

pmartyn
Posts: 42
Joined: Thu Feb 28, 2013 7:11 pm
Skillset: COBOL, IMS, CICS, DB2
Referer: Friend

Re: DL1 status code GB - end of database

Postby pmartyn » Wed Apr 24, 2013 2:46 am

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.


  • Similar Topics
    Replies
    Views
    Last post