Using OSAM as the access method

OSAM is a special access method supplied with IMS. Other z/OS® access methods (VSAM and SAM) are used in addition to OSAM for physical storage of data.

This topic contains Product-sensitive Programming Interface information.

You need to know the following information if your database is using OSAM as an access method:

Communication

IMS communicates with OSAM using OPEN, CLOSE, READ, and WRITE macros. In turn, OSAM communicates with the I/O supervisor by using the I/O driver interface.

Data sets

An OSAM data set can be read by using either the BSAM or QSAM access method.

You can define sequential OSAM data sets that use the BSAM access method as z/OS large format data sets by specifying DSNTYPE=LARGE on the DD statement. Large format data sets can exceed 65,535 tracks.

The maximum number of extents in an OSAM data set is 120. However, the maximum number might be less if the length of the z/OS data extent block (DEB) that is associated with the OSAM data set increases.

The length of a DEB is represented in a single byte that is expressed as the number of double words. The format and length (expressed in double words) of a DEB are shown in the following table.

Table 1. Length and format of an OSAM DEB
Format Length in double words
Appendage sector table 5
Basic DEB 4
Access method dependent section 2
Subroutine name section 4

An OSAM data set can be opened for update in place and extension to the end through one data control block (DCB). The phrase extension to the end means that records can be added to the end of the data set and that new direct-access extents can be obtained.

An OSAM data set does not need to be formatted before use, and an OSAM data set can use fixed-length blocked or unblocked records.

The maximum size of an OSAM data set depends on the block size of the data set and whether it is a HALDB OSAM data set. These are the size limits for OSAM data sets:
  • For a non-HALDB database, 4 GB if the data set has an odd-length block size or 8 GB if the data set has an even-length block size
  • For a HALDB database partition, 4 GB or 8 GB if the HALDB is registered to DBRC as supporting 8-GB OSAM data sets

File mark definition

File mark definition is always used to define the current end of the data set. When new blocks are added to the end of the data set, they replace dummy pre-formatted (by OSAM) blocks that exist on a logical cylinder. A file mark is written at the beginning of the next cylinder, if one exists, during a format logical cylinder operation. This technique is used as a reliability aid while the OSAM data set is open.

OSAM EXCP counts

OSAM EXCP counts are accumulated during OSAM End of Volume (EOV) and close processing.

Migration

You can migrate OSAM data sets by using ADRDSSU and the DFSMSdss component of z/OS DFSMS. DFSMSdss will migrate the tracks of a data set up to the last block written value (DS1LSTAR) as specified by the DSCB for the volume being migrated. If the OSAM data set spans multiple volumes that were not pre-allocated, the DS1LSTAR field for each DSCB will be valid and DFSMSdss can correctly migrate the data.

If the OSAM data set spans multiple volumes that were pre-allocated, the DS1LSTAR field in the DSCB for each volume (except the last) can be zero. This condition will occur during the loading operation of a pre-allocated, multi-volume data set. The use of pre-allocated volumes precludes EOV processing when moving from one volume to another, thereby allowing the DSCBs for these volumes not to be updated. The DSCB for the last volume loaded is updated during close processing of the data set.

You must use DFSMSdss physical DUMP or RESTORE commands with the parameters ALLEXCP or ALLDATA when you migrate OSAM data sets that span multiple pre-allocated volumes. These parameters allow DFSMSdss to correctly migrate OSAM data sets. For more information on the z/OS DFSMSdss component of DFSMS and the ALLEXCP and ALLDATA parameters of the DUMP and RESTORE commands, see the z/OS DFSMS Storage Administration Reference (for DFSMSdfp, DFSMSdss, and DFSMShsm).

You can enable OSAM data sets to reside in the extended addressing space of extended address volumes (EAVs) that are available in z/OS V1.12 or later. To enable an OSAM data set to reside in the extended addressing space of EAVs, specify an EAV volume on the VOL=SER= parameter when you allocate the data set. In addition, specify the attribute EATTR=OPT to indicate that the data set supports the extended attributes that are needed to use the extended addressing area.
Restriction: Data sets with EATTR=OPT specified on them cannot be shared with an IMS Version 10 or IMS Version 11 system because those IMS versions do not support extended attributes.

z/OS encryption

You can encrypt OSAM databases by using z/OS data set encryption.

To encrypt OSAM database data sets, you must define them as VSAM extended format linear data sets (LDS) and specify a key label. Other IMS OSAM data sets, such as OSAM databases that use physical sequential data sets, Queue Manager (QMGR) data sets, and recovery data sets (RDS), cannot be encrypted by using z/OS data set encryption.