View previous topic :: View next topic
|
Author |
Message |
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dineshness
New User
Joined: 25 Dec 2006 Posts: 63 Location: Perambalur
|
|
|
|
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 |
|
|
|