View previous topic :: View next topic
|
Author |
Message |
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Sigh. Tell me about it, Dick -- I work for a newspaper! |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Why do today what somebody else can do tomorrow? |
|
Back to top |
|
|
|