View previous topic :: View next topic
|
Author |
Message |
Vaishnavi Srivijaya
New User
Joined: 31 Oct 2007 Posts: 11 Location: Bangalore - India
|
|
|
|
Hi,
I need to read a VSAM file with its alternate index in my batch program. My File-control declaration is as below
Code: |
SELECT ACCOUNT-FILE ASSIGN TO IKG99NC
ORGANIZATION IS INDEXED
ACCESS IS RANDOM
RECORD KEY IS IX151-KEY1-TOP-CPI
ALTERNATE RECORD KEY IS
IX151-KEY1-ACCT-NUM WITH DUPLICATES
FILE STATUS IS WS-ACC-FILE-SW. |
The FD declaration is as
Code: |
FD ACCOUNT-FILE.
++INCLUDE NIXI151 (Copy book that has Files record layout) |
When i Open the File in my program i get file status as 35. (File not found). The file contains some data
Is there any JCL changes required for accessing VSAM File with alternate index like specifying the path file?
Can anyone pls help?
Edited: Please use BBcode when You post some code, that's rather readable...Anuj |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the jcl for this step. It may also help if you post the DEFINE for the alternate index. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
IKG99NC1 DD name must be present in your JCL and it must point to the path for the alternate index. If not set up this way, you probably would get a 35 file status upon open. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Vaishnavi Srivijaya
New User
Joined: 31 Oct 2007 Posts: 11 Location: Bangalore - India
|
|
|
|
Thanks Robert, After specifying the path file it worked.
Thanks a lot. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear it worked. |
|
Back to top |
|
|
|