VSAM extended addressability

DFSMS supports VSAM data sets greater than 4GB in size through extended addressability (XADDR) support. XADDR support is an extension to DFSMS extended-format data set support. VSAM XADDR supports key sequenced data sets (KSDS), entry sequenced data sets (ESDS), and relative-record data set (RRDS).

Restriction: z/OS® XL C/C++ does not support XADDR for ESDS alternate indexes.

VSAM XADDR support includes an 8 byte relative byte address for use with positioning functions such as flocate(). flocate() supports key lengths of 4 and 8 bytes. Existing applications that use flocate() to locate with a 4 byte relative byte address will continue unaffected, but must use a key length of 8 to locate a record within XADDR addresses.

The RBA field in the __amrc structure is set to -1 when applications access beyond the addresses that can be represented by the 4 byte value, effectively appearing to be EOF to any 4 byte RBA positioning (flocate()) calls. The __XRBA field will always be updated with the address, and must be used in these cases.

For AMODE 31 applications repositioning within a VSAM data set, users of ftell() and fseek() that need to access XADDR addresses, must use the large file version of ftello() and fseeko() .

XADDR support for AMODE 31 applications is listed in the following table:
Table 1. AMODE31 application XADDR support
Function XADDR support
fgetpos(), fgetpos_unlocked() Yes
fsetpos(), fsetpos_unlocked() Yes
ftell(), ftell_unlocked() No
fseek(), fseek_unlocked() No
ftello() or ftello_unlocked() non-large files version No
fseeko() or fseeko_unlocked() non-large files version No
ftello() or ftello_unlocked() large files version Yes
fseeko() or fseeko_unlocked() large files version Yes
flocate() or flocate_unlocked() Yes
fldata() or fldata_unlocked() Yes
Note: AMODE 64 applications also have the above restrictions on XADDR support.