Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is alternate indexes must for alternate key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Fri Feb 02, 2007 10:24 pm    Post subject: Is alternate indexes must for alternate key
Reply with quote

hi
is it necessary to create alternate index if i am using alternate key in my program...

here is in detail. i have the following in my program

000126 SELECT CUSTFILE ASSIGN TO CUSTFILE
000127 ORGANIZATION IS INDEXED
000128 ACCESS IS DYNAMIC
000129 RECORD KEY IS SF17-VSAM-REC-NO
000130 ALTERNATE RECORD KEY IS SF17-VSAM-BLACT-F
000131 FILE STATUS IS WS-VSAM-STATUS VSAM-CODE.

in my file section i have
000140 FD CUSTFILE.
000141 01 SF17-VSAM-CUST-RESP-REC.
000142 05 SF17-VSAM-REC-NO PIC 9(9).
000143 05 SF17-VSAM-CUST-GRP.
000144 10 SF17-VSAM-BLACT-F PIC S9(9).
000145 10 SF17-VSAM-CU-LN-F PIC S9(9).


1. in order for this to work do i have to create alternate index for the alternate key?
2. also could you please let me know how and what all to define for ksds vsam file for the above requirement
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sat Feb 03, 2007 12:35 am    Post subject:
Reply with quote

According to how I read it, the VSAM file needs to have an alternate index on it to use the alternate key clause.
The AMS manual has the instructions on how to create an AIX.
Back to top
View user's profile Send private message
dineshness

New User


Joined: 25 Dec 2006
Posts: 63
Location: Perambalur

PostPosted: Sat Feb 03, 2007 12:44 am    Post subject: Re: Is alternate indexes must for alternate key
Reply with quote

Yes. You need to create an alternate index to use the alternate key.

You must create Alternate Index and Path using IDCAMS before using them in your program.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Several errors during building altern... Andi1982 JCL & VSAM 11 Wed Jul 06, 2016 7:39 pm
No new posts Drop building Alternate Index for a p... bhavin.mehta JCL & VSAM 6 Mon Jul 04, 2016 3:47 pm
No new posts VSAM Alternate Index in CICS jacobdng CICS 2 Fri May 06, 2016 1:41 pm
No new posts Retrieve records in the order of alte... jacobdng Compuware & Other Tools 8 Fri Jul 31, 2015 8:16 am
No new posts EIBRESP 13 on Alternate Index amitc23 CICS 7 Wed Feb 18, 2015 6:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us