View previous topic :: View next topic
|
Author |
Message |
Nsuma
New User
Joined: 10 Dec 2007 Posts: 13 Location: Hyd
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Nsuma
New User
Joined: 10 Dec 2007 Posts: 13 Location: Hyd
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|