Page 1 of 1

vsam doubts

PostPosted: Sun Dec 05, 2010 10:04 am
by pavan
in a vsam file where indexes are actually stored? and how can we delete records from a vsam file?

Re: vsam doubts

PostPosted: Sun Dec 05, 2010 10:27 am
by dick scherrer
Hello,

Here is a link to an IBM redbook called Vsam Demystified:
http://www.redbooks.ibm.com/abstracts/s ... .html?Open

This document has all of the information you will need. Suggest you download the pdf so it will always be easily available.

The delete/define for the vsam file specifies where the index is to be stored.

Re: vsam doubts

PostPosted: Tue Jan 18, 2011 10:40 pm
by suma m.s
hi,

is it possible to view the contents of a vsam file just by opening it? :?:

Re: vsam doubts

PostPosted: Wed Jan 19, 2011 1:27 am
by Robert Sample
How would you view the contents of the VSAM data set without opening it?

Opening the VSAM file implies a program is being run -- that program could show you the contents of the data set, depending upon which program it is.

Re: vsam doubts

PostPosted: Wed Jan 19, 2011 1:55 am
by steve-myers
suma m.s wrote:hi,

is it possible to view the contents of a vsam file just by opening it? :?:
You have to OPEN a VSAM dataset (not "file")before you can do anything (other than delete it!) with it. If you want to view the contents of a VSAM dataset you can use the PRINT command in IDCAMS.

The index of a VSAM dataset is stored in an index dataset. The index dataset is automatically allocated when you define a KSDS dataset. You can get the actual name of the index dataet by using the IDCAMS LISTCAT command. You can view the index as a separate entity by using the IDCAMS PRINT command, but it won't do you much good unless you really know VSAM internals.

Re: vsam doubts

PostPosted: Wed Jan 19, 2011 5:03 am
by alexlloyd54
suma m.s wrote:hi,

is it possible to view the contents of a vsam file just by opening it? :?:


you could use IDCAMS's Print to print either all or few records :D

Re: vsam doubts

PostPosted: Wed Jan 19, 2011 10:37 am
by NicC
As far as I am aware an OPEN in any language does not retrieve data so that language would have to issue reads.