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 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: 8151
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: 1243
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 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 Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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