Hi Russ,
Two ideas:
Did you specify '#pragma intrinsic FFINDBYKEY'?
Is the key blank filled to 26 bytes?
Hope this helps!
Bill
HP/CSY
-----Original Message-----
From: Russ Smith <[log in to unmask]>
To: [log in to unmask] <[log in to unmask]>
Date: Monday, December 04, 2000 1:00 PM
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
>
|