View previous topic :: View next topic |
Author |
Message |
hisabari Beginner
Joined: 20 Apr 2005 Posts: 6 Topics: 4
|
Posted: Thu May 05, 2005 10:27 am Post subject: Can we read Empty File? (Vsam or Flat file) |
|
|
1.Can we read the Empty VSAM Indexed file?
2. Can we read the Empty FLat file?
Suppose i read the empty file Is it thru any error. What is the file status of this error? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu May 05, 2005 10:42 am Post subject: |
|
|
hisabari,
Quote: |
1.Can we read the Empty VSAM Indexed file?
|
There are 2 types of empty files in vsam.
a. If you create a cluster and try to read it you will get an Error code of 160 because the cluster is not 'initialized'. Upon creation the cluster is "empty" and you need to initialize a newly defined vsam file before manipulating it.
b. Another version of empty is that you deleted all the existing records in a vsam cluster. In that case if you try to read you will get an status code of 10 which means the end of the file had been reached.
Quote: |
2. Can we read the Empty FLat file?
|
Yes you can. If you try to read you will get an status code of 10 which means the end of the file had been reached.
Check this link which explains in detail about the file-status codes
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/6.1.8.9?SHELF=&DT=20020920180651&CASE=
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
hisabari Beginner
Joined: 20 Apr 2005 Posts: 6 Topics: 4
|
Posted: Thu May 05, 2005 11:45 pm Post subject: |
|
|
Thanx Kolusu,
But i got an file status code 35. Because I try to open an Empty file , thatsy i got this error, i think. I didnt get any error code such 160.
Cheers ,
sabari |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon May 09, 2005 10:18 am Post subject: |
|
|
hisabari,
You are right, you would get a file-status of 35 when you try to open a file via cobol program . You would get a status of 160 when you try to REPRO on an empty vsam file.
Thanks
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|