×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VSAM ALTERNATE INDEX

VSAM ALTERNATE INDEX

VSAM ALTERNATE INDEX

(OP)
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
      

RE: VSAM ALTERNATE INDEX

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close