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 

what's the use of vsam init?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
xxman
Beginner


Joined: 28 Jun 2003
Posts: 2
Topics: 1

PostPosted: Sun Jul 06, 2003 1:09 am    Post subject: what's the use of vsam init? Reply with quote

hi all,
i know that i can use IDCAMS to allocate a vsam file.
but , before i can use it in my cobol program,
i have to initialize this file.
could anybody tell why?
what vsaminit do actually to the file?
Very Happy
Back to top
View user's profile Send private message  
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Mon Jul 07, 2003 5:32 am    Post subject: Reply with quote

Its all about HURBA.

From VSAM Demystified:
Quote:

3.9.1 High used RBA value (HURBA) for KSDS
There are two HURBAs per KSDS cluster: the data HURBA, and the index HURBA:

• Data HURBA

This is the RBA of the physically highest record in data CI (it does not
imply the highest key, because the existence of splits). In other words, it
points to the end of the last CA which ever, at any time, contained data. It
is incremented by one CA, if a CA split or add-to-the-end in a new CA
occurs. It is always on a CA boundary.

If all logical records are deleted the HURBA does not turn to zero — only
via create or re-setting. Also, if the data set was defined with the Reuse
option, in this case at Open time, HURBA is re-set to zero.

When share option cross-system 4 is set to the data set, this value cannot
be modified.

If a data set has HURBA=0, it cannot be opened for input.

• Index HURBA

This points to the end of the last index CI written. It is incremented by one
CI if a new record is added to the index. Separate HURBA values are
maintained for the imbedded sequence set, and the high level index if
IMBED is used. Index HURBA is always on a CI boundary.


HURBA is set to a non-zero value when you initialize the file, enabling you to open the file for input.
Back to top
View user's profile Send private message Send e-mail  
xxman
Beginner


Joined: 28 Jun 2003
Posts: 2
Topics: 1

PostPosted: Mon Jul 07, 2003 8:11 am    Post subject: Reply with quote

thanks for your replying, premkumar.

but how to explain this:
I can repro records from qsam to a vsam thant dosen't be initialized.

and in your company, what data base do u use? vsam?
Back to top
View user's profile Send private message  
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Mon Jul 07, 2003 10:41 pm    Post subject: Reply with quote

xxman,

Zero HURBA will NOT allow you to open the file only for INPUT. It will not complain when you open an uninitialized file for OUTPUT. Got it?

Yes. Our clients application, which we maintain, uses VSAM.
Back to top
View user's profile Send private message Send e-mail  
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management 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