IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is alternate indexes must for alternate key


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Sat Feb 03, 2007 12:35 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Add column to existing records using ... JCL & VSAM 2
No new posts Issue in KWIKKEY utility while creat... JCL & VSAM 2
This topic is locked: you cannot edit posts or make replies. VSE COBOL - File Status 46 when readi... COBOL Programming 8
No new posts ALTERNATE RECORD KEY usage for KSDS AIX COBOL Programming 1
No new posts DO we have alternate syntax for IFTHEN? Compuware & Other Tools 8
Search our Forums:

Back to Top