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

Accessing VSAM file with alternate index


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vaishnavi Srivijaya

New User


Joined: 31 Oct 2007
Posts: 11
Location: Bangalore - India

PostPosted: Thu Nov 20, 2008 12:35 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 20, 2008 8:37 pm
Reply with quote

Hello,

Please post the jcl for this step. It may also help if you post the DEFINE for the alternate index.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 20, 2008 11:40 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Nov 21, 2008 2:16 am
Reply with quote

Hi,

Worth looking at these earlier threads before posting some more:

www.ibmmainframes.com/viewtopic.php?t=35129&highlight=alternate
www.ibmmainframes.com/viewtopic.php?t=34891&highlight=alternate
www.ibmmainframes.com/viewtopic.php?t=32799&highlight=alternate
www.ibmmainframes.com/viewtopic.php?t=32190&highlight=alternate
Back to top
View user's profile Send private message
Vaishnavi Srivijaya

New User


Joined: 31 Oct 2007
Posts: 11
Location: Bangalore - India

PostPosted: Fri Nov 21, 2008 1:30 pm
Reply with quote

Thanks Robert, After specifying the path file it worked.
Thanks a lot.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 21, 2008 5:45 pm
Reply with quote

Glad to hear it worked.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top