HP3000-L Archives

April 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Hornsby <[log in to unmask]>
Reply To:
Mike Hornsby <[log in to unmask]>
Date:
Tue, 13 Apr 2004 09:21:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
> My Cobol program does a serial read thru a master (either an auto or
manual)
>
>      COPY DBGET OF DBMACROP.
>      %DBGET(WS-BN-ACCESS-PATH-1#
>            ,WS-BN-SET-NAME#
>            ,I-MOD2#
>            ,I-STAT#
>            ,I-ALLI#
>            ,WS-DB-BUFFER-1#
>            ,I-PASS#)
>      END-CALL
> My problem is on a manual master when the key item is not the first item
in
> the data set. My difficulty is trying to get the data value of the COMP
key
> item.

From the call structured above, I gather that you are using the @ list
specification. If you switch to using the search item name or
number in the first DBGET, then use the * list in each subsequent DBGET you
will solve your debuffering problem and increase the
performance at the same time.

Also, as a side note, the PM in DBSTAT2 may have been required as back then
DBINFO was rather incomplete and many of the current modes
could only be simulated by reading the ROOT file directly.

Mike

----- Original Message -----
From: "Brian Donaldson" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, April 12, 2004 5:47 PM
Subject: [HP3000-L] DBGET and extracting comp and/or packed fields


> My Cobol program does a serial read thru a master (either an auto or
manual)
>
>      COPY DBGET OF DBMACROP.
>      %DBGET(WS-BN-ACCESS-PATH-1#
>            ,WS-BN-SET-NAME#
>            ,I-MOD2#
>            ,I-STAT#
>            ,I-ALLI#
>            ,WS-DB-BUFFER-1#
>            ,I-PASS#)
>      END-CALL.
>
>
> I already know the offset and length of the key item from a previous call
> to DBINFO mode 102 outside of the DBGET mode 2 loop.
>
> If the key item is defined as an "X", "U" or "Z" type I have no problem
> extracting the data value from the buffer WS-DB-BUFFER-1. Works great on
> alpha type keys.
>
> Different animal when I am working on masters whose key items are either
> COMP or PACKED items.
>
> My problem is on a manual master when the key item is not the first item
in
> the data set. My difficulty is trying to get the data value of the COMP
key
> item.
>
> I have tried MOVEing WS-DB-BUFFER-1 (DBINFO102-OFFSET:DBINFO102:LENGTH)
> to different types of fields in working-storage (X:length, N:length etc
etc)
> but can't seem to get the data values loaded correctly into a stand alone
> working-storage COMP field.
>
> I cannot assume I know the layout of the data set structure.
>
> Any help would be appreciated from anyone who has BTDT....
>
> TIA,
>
> Brian Donaldson.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2