First, thanks everyone for the fast responses.
Okay, let's see.....
1) Yes, the intrinsic has been defined using a "#pragma" statement. (Side
note, if it wasn't, an attempt to run the program after linking it would
result in a "unresolved externals" error.)
2) I've tried the instrinsic call with FindKey specified as an address
(preceeded with "&"), both qualified with an instance/positional pointer
"[0]" and not; and as a variable (no preceeding "&").
3) The value in the variable is already 26 characters (filling the array);
but I have also tried smaller values with spaces filling out the string.
The error doesn't change. It is consistently "186 - Invalid Key Length".
I have a few other resources I want to use to try to address this, but if
anyone has another suggestion, I would appreciate it.
Thanks,
Rs~
p.s. in case this will help anyone, KSAMUTIL Verify 4 output shown below:
FOPTIONS(006005)=KSAM, NO :FILE, NOCCTL, F, FILENAME, ASCII, PERM
AOPTIONS(000440)=DEFAULT, NOBUF, DEFAULT, FLOCK, NO MR, IN
RECSIZE:SUB:TYP:LDNUM:DRT:UN.: CODE:LOGICAL PTR: END OF FILE:FILE LIMIT
-38: 8: 3: 2: 8: 0: 0: 0: 14876: 40000
LOG. COUNT:PHYS. COUNT:BLK SZ:EXT SZ:NR EXT: LABELS:LDN: DISCADDR:
2: 1: -874: 220: 32: 0: 0:00000000000:
KEY FILE=KSGENXDX KEY FILE DEVICE=2 SIZE= 17442 KEYS= 2
FLAGWORD(000000)=RANDOM PRIMARY, FIRST RECORD=0, PERMANENT
KEY TY LENGTH LOC. D KEY BF LEVEL
1 B 26 1 Y 58 3
2 B 12 27 Y 100 3
----- Original Message -----
From: "Bill Cadier" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, December 04, 2000 12:52 PM
Subject: Re: [HP3000-L] KSAM Intrinsic help
> 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
> >
>
|