I'm certainly no KSAM expert, but I do know you'll load much faster and
end up with much faster operation if you sort your data to match, well,
there's the rub: Use only ONE key for your file! Multiple keys are
possible, but unless each new record falls at the end of a branch, it has
to be inserted, = overhead.
I've used KSAM for multiple-index people-search in the past (ie, look
people up by (partial) 1stName, LastName, Address, City, etc) in the
past; turns out things work MUCH better by having 3 million records with
ONE key than 1 million records with 3 keys, etc.
And if you're going to UPDATE (rather than just reload) the file, DON'T
allow multiple keys (at least not on the primary key) - the newer
intrinsics don't support updating any but the first occurrence.
Use Image for your data, it's SAFE! Use KSAM for its partial-key lookup
- the best feature IMHO.
And, Read The Fine Manual, you won't regret it!
K Tracy Pierce
Systems Programmer
Golden Gate Bridge, Hwy & Trnsp Dist
San Francisco, CA 94129-0601
|