HP3000-L Archives

December 2000, 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:
Johan Harmsen <[log in to unmask]>
Reply To:
Johan Harmsen <[log in to unmask]>
Date:
Mon, 4 Dec 2000 21:30:26 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
Hi,

Never used this intrinsic myself, but I would try to remove the
ampersand (&) before FindKey in the intrinsic call. Most C-compilers
give a warning because FindKey is already an address.
I'm not sure how this is handled when calling an intrinsic, which
you obviously defined using the #pragma directive

Johan
----- Original Message -----
From: "Russ Smith" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, 04 December, 2000 20:58
Subject: [HP3000-L] KSAM Intrinsic help


> Listers,
>
> I have a HP-C/iX program using the FFINDBYKEY intrinsic to locate a record
> in a KSAM file using the following code:
>
>    char FindKey[26];
>
>    if(TestMode==1)
>       fprintf(stderr,"\nRead KSAM with: %s", FindKey);
>
>    FFINDBYKEY(KSAMFileNo, &FindKey, 0,0,0);
>    MPEerr(KSAMFileNo,1101);
>
> The records were not being found, so I inserted the call to my error
> subroutine to discover why.
>
> The reported tombstone shows the error to be 186 (Invalid Key Length), but
> the documentation I have for this intrinsic tells me that passing zeros in
> the key number, key length and reation operator parameters will default to
> "primary key", "full key usage" and "equals specified value",
respectively.
>
> I have tried specifiying values ranging from zero to the key length (26),
> using both int and short variables (though the intrinsic specifies
> 16V-shorts), and have tried hard coded numbers.  I have issued a KSAMUTIL>
> KI KSAM1;RECOVER command just in case there is a problem with the file.
And
> nothing seems to help.
>
> Assuming that the intrinsic doesn't actually mind using the entire key,
what
> situations might cause this error?
>
> Thanks,
> Rs~
>
>
> Russ Smith, Systems Consultant
> Problem Solved, Vacaville, CA
> r s m i t h @ c u - h e l p . c o m
> h p 3 k - l @ e - 3 0 0 0 . n e t

ATOM RSS1 RSS2