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

Getting 47 in VSAM File read


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

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Sat Jul 04, 2009 8:26 pm
Reply with quote

Greetings.

My JCL executes a program to read a VSAM file. Who ever devloped the code did not check the VSAM Staus after Opening the file. After read only they are checking whether READ is success or not.

I am getting VSAM status 47, i knew that READ has been tried on a file which is not opened in Input or I-O mode. But i could able to see the file Open statement (I-O Mode) in program before the READ.

I appreciate if some one could throw some information on this?
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: Sat Jul 04, 2009 8:41 pm
Reply with quote

If the OPEN failed, the 47 would follow naturally. You need to check the file status code after the OPEN to verify that you can proceed.
Back to top
View user's profile Send private message
rexx77

New User


Joined: 14 Apr 2008
Posts: 78
Location: Mysore

PostPosted: Sat Jul 04, 2009 9:00 pm
Reply with quote

Unfortunately i dont have permission to edit the program and recompile it. The dataset i wanted to read is accessed by many programs. Is it causing any issues?
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: Sat Jul 04, 2009 9:24 pm
Reply with quote

Possibly -- if you've got DISP=SHR specified and attempt to open the file I-O, I'm not sure what file status code would be generated. Try running with DISP=OLD and I think the read 47 file status will go away.

I also recommend you get somebody to add the OPEN file status check to the code and recompile it since it really should be done sooner or later.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 04, 2009 9:36 pm
Reply with quote

Quote:
...be done sooner or later.


and his manager says:
but that costs money.. the next guy can do it, or i'll do it when i really really have to.
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: Sat Jul 04, 2009 9:52 pm
Reply with quote

Sigh. Tell me about it, Dick -- I work for a newspaper!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Jul 05, 2009 9:08 pm
Reply with quote

Why do today what somebody else can do tomorrow?
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 Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top