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
 

 

Accessing VSAM file with alternate index

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Accessing VSAM file with alternate index
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

Site Director


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

PostPosted: Thu Nov 20, 2008 8:37 pm    Post subject:
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: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 20, 2008 11:40 pm    Post subject:
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

Senior Member


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

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

Hi,

Worth looking at these earlier threads before posting some more:

http://www.ibmmainframes.com/viewtopic.php?t=35129&highlight=alternate
http://www.ibmmainframes.com/viewtopic.php?t=34891&highlight=alternate
http://www.ibmmainframes.com/viewtopic.php?t=32799&highlight=alternate
http://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    Post subject:
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: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Fri Nov 21, 2008 5:45 pm    Post subject:
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    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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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