Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File open error 37 for a KSDS VSAM file in OUTPUT mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
karthick Raja

New User


Joined: 10 Aug 2006
Posts: 8

PostPosted: Thu Dec 07, 2006 5:15 pm    Post subject: File open error 37 for a KSDS VSAM file in OUTPUT mode
Reply with quote

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

cobolunni

Active User


Joined: 07 Aug 2006
Posts: 128
Location: kerala,india

PostPosted: Thu Dec 07, 2006 5:49 pm    Post subject: Re: File open error 37 for a KSDS VSAM file in OUTPUT mode
Reply with quote

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 http://www.simotime.com/vsmfsk01.htm
Back to top
View user's profile Send private message
karthick Raja

New User


Joined: 10 Aug 2006
Posts: 8

PostPosted: Thu Dec 07, 2006 6:34 pm    Post subject: Re: File open error 37 for a KSDS VSAM file in OUTPUT mode
Reply with quote

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

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Dec 07, 2006 7:22 pm    Post subject: Re: File open error 37 for a KSDS VSAM file in OUTPUT mode
Reply with quote

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

New User


Joined: 10 Aug 2006
Posts: 8

PostPosted: Fri Dec 08, 2006 9:40 am    Post subject: Re: File open error 37 for a KSDS VSAM file in OUTPUT mode
Reply with quote

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

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Fri Dec 08, 2006 11:50 am    Post subject:
Reply with quote

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
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Fri Nov 27, 2009 9:34 am    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Fri Nov 27, 2009 10:48 am    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Fri Nov 27, 2009 4:28 pm    Post subject:
Reply with quote

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... icon_neutral.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Nov 27, 2009 6:39 pm    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Fri Nov 27, 2009 8:27 pm    Post subject:
Reply with quote

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... icon_smile.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 2 Fri Sep 22, 2017 7:08 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 0 Mon Sep 18, 2017 4:31 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us