Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HP3000 DB-OK, NOT DB-OK 1

Status
Not open for further replies.

Dan01

Programmer
Jun 14, 2001
439
0
0
US
please expain what DB-OK and NOT DB-OK actually mean. Thanks, Dan.
 
Dan -

DB-OK is a Level-88 condition name. It is probably defined in a copybook that your company company uses as a standard when writing programs that work with IMAGE databases.

All calls to IMAGE intrinsics (subroutines) require a status area to be passed to the intrinsic as the second argument. The first word of the status area is used to pass back to the program a "condition code" that describes the success or failure of the IMAGE call. A value of zero indicates successful completion and is likely the value that DB-OK is used to test for. NOT DB-OK obviously is true in any case where DB-OK is false. Other things the condition word can indicate include reaching the end/beginning of a chain of records, end/begining of a dataset, and dataset full. The other words or doublewords in the status area convey other information returned from various IMAGE calls.

Example:
Code:
01  DB-STATUS-AREA COMP.
    05  DB-CONDITION-WORD     PIC S9(4).
        88  DB-OK             VALUE ZERO.
    05  DB-TRANSFER-WORDS     PIC S9(4).
    05  DB-RECORD-NUMBER      PIC S9(8).
    05  DB-CHAIN-LENGTH       PIC S9(8).
    05                        PIC S9(8).
    05                        PIC S9(8).
Regards.

Glenn
 
Thanks Glenn. It's clear now. Also thanks to Dimandja for asking. Dan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top