HP3000-L Archives

November 1999, Week 1

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:
Bob Comeau <[log in to unmask]>
Reply To:
Bob Comeau <[log in to unmask]>
Date:
Thu, 4 Nov 1999 11:16:06 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
I'm not sure about using the "F~" intrinsics, but when using the "CK~"
intrinsics or the COBOL commands START with KEY = and then successive READ
NEXT commands the STATUS returned is "02" if the NEXT RECORD (not the one
just read) still matches the key being read, when the STATUS "00" is
eventually returned, you have just read the last record with that key value.
To get this effect with the COBOL commands you must be using the whole key
as defined in the SELECT statement, but a partial key seems to work when
using the "CK~" intrinsics.

As others have said locking is important to get a true picture, and if
necessary copying all required records to a temporary file so they can be
read under one lock and use the temporary copy for viewing is work around if
absolutely current data is not required.

Bob


> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Eben Yong
> Sent: Thursday, November 04, 1999 12:35 AM
> To: [log in to unmask]
> Subject: KSAMXL question
>
>
> I am trying to set up a COBOL program that reads records in a
> KSAMXL file
> based on an exact match to a key value.  The file can contain multiple
> records based on the key value.  I only want to read those
> records that
> match the key value exactly.  I have been able to
> successfully find and read
> the first record using FREADBYKEY and FFINDBYKEY+FREAD, but
> then subsequent
> FREADs will take the rest of the KSAMXL file until it hits
> EOF.  How do I
> limit the FREAD so that it only reads the qualifying logical
> records (based
> on the key value)?  If someone could provide the intrinsic
> sequence and
> logic I can figure out the programming details.  Thank you for your
> assistance.
>
> Eben Yong
> MIS Manager
> Health Plan of San Mateo
> 650-616-2010
> [log in to unmask]
>

ATOM RSS1 RSS2