Page 1 of 1

VSAM RRDS vs Relative file

PostPosted: Thu Mar 02, 2017 10:18 am
by mbattu
Hi, I am trying to understand differences between

1) Physical Sequential vs ESDS
2) Index Sequential vs KSDS
3) Relative vs RRDS

I understand that ESDS is similar to Physical Sequential except that it can be accessed Directly although in CICS only using Relative Byte address

KSDS is similar to Index Sequential except that KSDS has separate index and the organization is in CI & CA. Index Sequential can be defined using RECORG=KS and specifying the KEYLEN in JCL

RRDS can be defined using IDCAMS and mentioning NUMBERED in it. Can anyone help me understand difference between Relative and RRDS and how Relative File can be defined.

Thank you for your response.

Re: VSAM RRDS vs Relative file

PostPosted: Thu Mar 02, 2017 11:03 am
by steve-myers
  • ESDS / non-VSAM sequential - You can obtain ESDS records by RBA in all environments, not just CICS. Non-VSAM sequential can be accessed by record number by using BDAM in some situations.
  • KSDS / indexed sequential - All VSAM data sets are organized in control intervals and control areas, though they are significant only in KSDS.
  • Perhaps you can tell us your understanding of a "relative file."

Re: VSAM RRDS vs Relative file

PostPosted: Thu Mar 02, 2017 12:23 pm
by enrico-sorichetti

Re: VSAM RRDS vs Relative file

PostPosted: Thu Mar 02, 2017 1:39 pm
by mbattu
Thanks Enrico, the document is very useful.

Thanks Steve for the information. Going through the document Enrico has provided that, I understand that there will be fixed number of slots which can retrieved by its Relative Record Number. Only DATA part is defined in the cluster and no Index part. Now I only wonder whether we can define a non VSAM relative file. If there is no such thing as non VSAM relative file, please let me know. Thank you again for your time in helping me understand.

Re: VSAM RRDS vs Relative file

PostPosted: Thu Mar 02, 2017 3:30 pm
by willy jensen
I guess that the closest you can get is a direct access dataset.

Re: VSAM RRDS vs Relative file

PostPosted: Fri Mar 03, 2017 2:46 am
by steve-myers
mbattu wrote:Thanks Enrico, the document is very useful.

Thanks Steve for the information. Going through the document Enrico has provided that, I understand that there will be fixed number of slots which can retrieved by its Relative Record Number. Only DATA part is defined in the cluster and no Index part. Now I only wonder whether we can define a non VSAM relative file. If there is no such thing as non VSAM relative file, please let me know. Thank you again for your time in helping me understand.


Evidently you did not read the first bullet in my first post. Mr. Jensen alludes to this in his post. The primary qualifier is the data set pretty much has to be defined as RECFM=FBS. If the data set is defined as RECFM=FBS, your program has to translate the relative record number to a relative block and record in the block and use BDAM to read the correct relative block and then move to the correct record in the block.