HP3000-L Archives

April 2001, Week 4

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:
Pat Shugart <[log in to unmask]>
Reply To:
Pat Shugart <[log in to unmask]>
Date:
Thu, 26 Apr 2001 15:53:20 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (111 lines)
Thanks, Doug. And to all the others who clued me in. I didn't have access to any docs for DBFIND to confirm my earlier thinking (which turned out to be incorrect).

Thanks to Doug and Leonard B. for the DBDRIVER info.

/pat

>>> Doug Werth <[log in to unmask]> 04/26/01 03:48PM >>>
Pat,

That is exactly what the chain length parameter does for you on a DBFIND.
Status words 5&6 contain the number of entries on the chain. Here is an
example using DBDRIVER.

:dbdriver
DBDRIVER C.05.00   THU, APR 26, 2001,  3:38 PM  (C) HEWLETT-PACKARD 1978

<< OPEN the database >>
Command: !b=music
Command: !m=1
Command: !q=;
Command: o
Elapsed time (MS) = 452                 CPU = 208
Baseid=%000001  Class=64   Current DBG size=32767   DBU size=12288

<< DBFIND for search item value octal 161 (dec 113) >>
<< Call is successful and there is one entry on the chain >>
Command: !s=log
Command: !q=selections
Command: !i=ALBUMCODE
Command: !q=SELECTIONS
Command: !m=1
Command: !a=%161
Command: f
Elapsed time (MS) = 2                   CPU = 1
Command: ?s
0000 0000 0000 0000 0000 0001 0000 0001 0000 0001
<< chain length = 1 ^^^^^^^^^ >>

<< Now try against another dataset. The find will succeed >>
<< but the chain length is zero >>

Command: !q=LOG
Command: f
Elapsed time (MS) = 9                   CPU = 9
Command: ?s
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
<< chain length = 0 ^^^^^^^^^ >>

HTH.

Doug.

Doug Werth                             Beechglen Development Inc.
[log in to unmask]                               Cincinnati, Ohio



----- Original Message -----
From: "Pat Shugart" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, April 26, 2001 2:56 PM
Subject: [HP3000-L] IMAGE,COBOL:Determining path information


Hello all,

I need to determine in a DBFIND (not DBGET) if an entry exists in a specific
dataset for a key value. I hope I can make my explanation clear enough...

For example:

Dataset A (DETAIL)
PATHNAME = KEY
VALUE = "HI MOM"

Dataset B (DETAIL)
PATHNAME = KEY
VALUE = "HI MOM"
or
The value may not exist at all in B while it exists in A

Both use the same auto-master.

I'm reading in a file and trying to determine if a duplicate record
condition would occur if I were to do a DBPUT. I'm thinking that DBFIND only
interogates the master entry and its chain length and not specific to the
dataset. Is that correct? We tried doing a DBFIND and a DBGET, but it broke
something else in the program and we're trying to do as little work as
possible (isn't that always the case?)

TIA for any thoughts,


..................................................................
 t?t  .?.*  t?t  .?.*  t?t  .?.*  t?t
..................................................................
Pat Shugart
Trinity Information Services
Farmington Hills, MI 48331
248.489.6123
248.488.9195 (fax)

* 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 *

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

ATOM RSS1 RSS2