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
 

 

File-status "35" while opening VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
naveen_kj

New User


Joined: 18 Aug 2003
Posts: 2

PostPosted: Tue Aug 19, 2003 8:38 pm    Post subject: File-status "35" while opening VSAM
Reply with quote

Hi,

I have a new VSAM file created. In the program the VSAM file is opening in the input mode. When the program is executed, it is giving file-status "35" for opening of VSAM file.

I created a temporary record in the VSAM file using a simple program (open in output and close). But still it gave file-status 35 for open.

I inserted a blank record and executed the program, it executed successfully.

I want know, how to initialize the vsam file in the program to avoid this file-status 35 for open in input mode?

The initialization of VSAM file can be done through a JCL, before the execution of the program?

Thanks in advance,

Naveen
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Wed Aug 20, 2003 8:21 am    Post subject: Re
Reply with quote

You may get file status 35 when you try to open a NON-OPTIONAL or UNAVAILABLE file in INPUT/EXTEND Mode.
Back to top
View user's profile Send private message
naveen_kj

New User


Joined: 18 Aug 2003
Posts: 2

PostPosted: Wed Aug 20, 2003 9:01 pm    Post subject:
Reply with quote

Millan,

Thanks for your reply.

In my program, the VSAM file has to be opened in input mode.
Is there any solution for this other than inserting a blank record before the execution of the program.

Naveen
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Thu Aug 21, 2003 8:26 am    Post subject: Re
Reply with quote

Yes, you can use OPTIONAL phrase on Select clause.

Better to check the file status before opening the file itself to avoid status errors.

Code:
OPEN INOUT <filename>.
IF <filestatus>  = "35" OPEN OUTPUT <filename>
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Mainframe Opening in Chennai ( 2 to 4... muralikrishnan_new Mainframe Jobs 0 Tue Jul 18, 2017 2:20 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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