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
 

 

VSAM file Handling

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

New User


Joined: 04 Aug 2008
Posts: 26
Location: Hyderabad

PostPosted: Tue May 12, 2009 11:27 pm    Post subject: VSAM file Handling
Reply with quote

Hi,

I have converted a cobol -1 code to cobol-390 . In this program a KSDS file is getting opened in I-O mode. The file is getting delete defined in the 1st step and in the 2nd step my program is using this file. In cobol-1 it is displaying file-status for this file as '00' where as cobol 390 it is giving file status as '35'. In order to resolve this issue I have moved low-values into this VSAM file once it got created(defined). But is will add up one extra record into the file anyways I did used SORT to skip this first rec but it increased some more steps to my JCL.Which is not recommended. So,please let me know is there any better solution for to handle this issue.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue May 12, 2009 11:34 pm    Post subject:
Reply with quote

In your COBOL program, open the VSAM file for OUTPUT. Write a record to it. Close it. Open the VSAM file for I-O. Delete the record. Proceed with your normal logic.

A VSAM file that has never had any data written to it will get a file status 35 on OPEN; there was a thread in the last couple of weeks where I wrote the code to verify that.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1228
Location: Israel

PostPosted: Wed May 13, 2009 1:53 am    Post subject:
Reply with quote

If you add a REPRO after the DEFINE, I believe you will be able to open the file as I-O.
For input to the REPRO, use a dummy file.

Try it, then tell us if it works!

By the way, did you search the forum ?
This question have been asked many times:
Initialize VSAM file
How can VSAM file be opened in I-O mode?
Will JOB Abend if Use empty VSAM file
Opening an Empty VSAM in I-O mode.
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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