View previous topic :: View next topic
|
Author |
Message |
karthick Raja
New User
Joined: 10 Aug 2006 Posts: 8
|
|
|
|
Hi,
When i tried to open a KSDS VSAM file in OUTPUT mode i am getting file open error of 37. the DISP i gave in JCL is OLD and even tried with SHR.
I have given the access mode as DYNAMIC.
This is the piece of code i used for SELECT
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS OUT-ID
----------
----------
PROCEDURE DIVISION.
START-PARA.
DISPLAY 'STARTED'.
OPEN OUTPUT OUTPUT-FILE.
This open statement is causing the error. I have tried with both empty file & with some data. Can any one help me on this.
Thanks in Advance. |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
file status 37 occurs because of
An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. Possible violations are:
1. The EXTEND or OUTPUT phrase was specified but the file would not support write operations.
2. The I-O phrase was specified but the file would not support the input and output operations permitted.
3. The INPUT phrase was specified but the file would not support read operations.
4. Under VSE, the EXTEND phrase was specified for a SAM file.
note: taken from www.simotime.com/vsmfsk01.htm |
|
Back to top |
|
|
karthick Raja
New User
Joined: 10 Aug 2006 Posts: 8
|
|
|
|
Hi,
Thanks for the reply. But i dont know the reason why i am getting that return code. I suppose the code has work fine.
I didnt find any error in the code.
please correct me if i am wrong. |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
karthick,
If my guess is correct,you might have created the VSAM file and initialized it previously before the program..
Hence if you want to write data into it ,then you should open the file in
I-O mode..
Regards,
Muhuvel. |
|
Back to top |
|
|
karthick Raja
New User
Joined: 10 Aug 2006 Posts: 8
|
|
|
|
Hi Muthuvel,
i dont get your explanation. Can you breif me on that please. What do you mean by the file is initialised?
But you are correct. The things are fine when it is opened in I-O mode.
i have checked it previously.
Thanks for your reply. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Karthick
Try dropping and recreating the VSAM file.It will be of more help if you can provide us with your VSAM file definition.
Thanks
Arun |
|
Back to top |
|
|
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
Arun Raj wrote: |
Hi Karthick
Try dropping and recreating the VSAM file.It will be of more help if you can provide us with your VSAM file definition.
Thanks
Arun |
Arun,
I was facing the same problem and i just droped the vsam and created it again, and now the program works fine. But i dont know how creating teh vsam again affects this. could u plz expalin the logic behind this ??
Thank you |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please note that you have posted a reply that has been inactive for almost 3 years. . .
Dropping and re-creating the file can remove any internal inconsistency or corruption. Dropping and re-creating the file also removes any chance of determining what was currently wrong with the file. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Pardon my ignorance (if it is) but does "dropping" really a correct term here in relation with VSAMs? VSAMs are used with DELETE/DEFINEd... one can DROP a table not file... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Anuj,
being a little picky aren't you?
people say
JCL when they should say JOB or STEP.
PROC when they should say REXX Script.
DROP when they should say delete.
this is more of a chat room than a technical forum.
my guess that a lot of people post here, because their technical co-workers
have had enough of the illiteracy. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Dick,
Yes actually...
First, I started my response with "Being little picky" instead of
Quote: |
Pardon my ignorance |
but then I thought about the kind of people log-in to this Forum, they are from very diverse backgrounds and the years of experience they have is much more than mine. On the other hand I think if such terminologies are in use at least at a single place even... I may ask more...may be in future I can corelate with those terms if come across again...nothing more than that.
Happy thanksgiving... |
|
Back to top |
|
|
|