IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

START on a empty indexed file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nsuma

New User


Joined: 10 Dec 2007
Posts: 13
Location: Hyd

PostPosted: Thu May 07, 2009 5:36 pm
Reply with quote

Hi All,
Please help me out on the below requirement.
I have empty indexed file(i have opened in i-o mode), can i use START on this file.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu May 07, 2009 5:53 pm
Reply with quote

When you say "empty" do you mean the file had a record written to it and deleted, or do you mean the file has been created but nothing has ever been written to it?

In the first case, you can use START but don't expect a 00 file status code since there's no data to position against. In the second case, you cannot do any reading of the file -- which I think (but haven't confirmed) means START either.
Back to top
View user's profile Send private message
Nsuma

New User


Joined: 10 Dec 2007
Posts: 13
Location: Hyd

PostPosted: Thu May 07, 2009 6:02 pm
Reply with quote

I am working on Second case ......i creating file(if not existed) by opening in i-o mode and using START command....START is for, if the file already exist.....i need use START to read the file. Can use START or not at this.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu May 07, 2009 6:24 pm
Reply with quote

I just deleted and defined a VSAM KSDS file, did not load any data into it, and attempted to use it in a COBOL program. The OPEN I-O got a 35 file status while the START got a 47 file status. Once I loaded the file with data, I got 00 file status codes for both operations.

I reiterate: do not attempt to OPEN I-O or START a VSAM file unless you've put data into it already.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top