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: 7995
Location: Bellevue, IA

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: 1226
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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