Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VSAM ALTERNATE INDEX

Status
Not open for further replies.

Mercykam

Programmer
Mar 26, 2009
3
DEFINE ALTERNATEINDEX-
(NAME(XXXX.VSAMFILE.ALT1)-
RELATE(XXXX.VSAMFILE)-
VOLUMES(* * * * * *)-
CYLINDERS(100 50)-
RECORDSIZE(1000 1000)
NONUNIQUEKEY-
FREESPACE(10 10)-
KEYS(13 33)-
UPGRADE-
NOREUSE-
CONTROLINTERVALSIZE(4096)-
TO(99365)-
SHAREOPTIONS(2 3)-
SPEED-
NOWRITECHECK)-
DATA-
(NAME(XXXX.VSAM.ALT1D))-
INDEX-
(NAME(XXXX.VSAM.ALT1I))
DEFINE PATH-
(NAME(XXXX.VSAM.ALT1PATH)-
PATHENTRY(XXXX.VSAM.ALT1)-
UPDATE)
BLDINDEX INDATASET(XXXX.VSAM)-
OUTDATASET(XXXX.VSAM.ALT1)

This is how the alternate index is set up. Vsam file is 1000 bytes. First 12 bytes is the key in base vsam file. I have an alternate index starting with position 33 for length of 13.

Initial few fields from Copybook is as follows
01 XXXX-RECORD
5 XXXX-KEY X(12)
5 FIELD1 9(5)
5 FIELD2 9(8)
5 FIELD3 9(8)
5 FIELD4 X(13) ---> Alternate index is by this field
5 FIELD5 X(31)
5 FIELD6 9(9)
5 FIELD7 X(31)
etc....

this is the situation:
KEY field has values KEY1, KEY2, KEY3 etc ...KEY83 (83 records).
Each of these 83 records has same value of "FIELD33" starting in Position 34 for length of 13.

So now when i build an alternate index i am getting a RC=04
with this following message
"IDC1646I 2 EXCESS PRIME KEY VALUES FOR AIX KEY" .

I looked at the alternate index file (XXXX.VSAM.ALT1) and its capturing a max of 81 records (KEY1, KEY2..KEY81) for "FIELD33". It could not fit the KEY82 and KEY83 records in "FIELD33" line it created.


Trying to find a solution for this problem. Can some one help.

Thanks
Mercy
 
I've seen this issue before. The record you've defined in the AIX is 1,000 bytes. That has to contain the key and the RBA of EACH duplicate base record for that key. Try increasing the record size.

Regards,

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top