MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can we read Empty File? (Vsam or Flat file)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
hisabari
Beginner


Joined: 20 Apr 2005
Posts: 6
Topics: 4

PostPosted: Thu May 05, 2005 10:27 am    Post subject: Can we read Empty File? (Vsam or Flat file) Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu May 05, 2005 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
hisabari
Beginner


Joined: 20 Apr 2005
Posts: 6
Topics: 4

PostPosted: Thu May 05, 2005 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon May 09, 2005 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group