The AccessParameterSAM class in the com.fujitsu.ts.jrio.DMS package provides a raft of additional methods for setting and inquiring further parameters which are specific to this access method.
Objects of this abstract class cannot be generated by the user. However, the RecordFile class provides the getAccessParameter() and getDefaultAccessParameter() methods via which the user can receive objects of this class’s implementation.
Inadmissible values in the individual parameters are generally not discovered when the values are entered in the Parameter object, but only when this object is used.
The getRecordFormat() method returns the record format stored in this parameter object. The setRecordFormat() method sets the record format in this Parameter object. RECORD_FORMAT_FIXED and RECORD_FORMAT_VARIABLE can be specified when SAM is used. This parameter corresponds to the RECFORM specification in DMS.
The getRecordLength() method returns the record length stored in this parameter object. The setRecordLength() method sets the record length in this Parameter object. This parameter corresponds to the RECSIZE specification in DMS. In conjunction with fixed record format, this parameter defines the exact length of each record in a file. With variable record format it defines the maximum length of each record. The length specification 0 is then permitted and means unlimited record length. The DMS/SAM-specific restrictions and dependencies on other parameters (record format, block length) naturally apply as much for JRIO as at other DMS interfaces.
The getBlockSize() method returns the block length stored in this parameter. The setBlockSize() method sets the logical block length (as a number of PAM blocks) in this parameter object. This parameter corresponds to the BLKSIZE=(STD,n)
specification in DMS. The dependencies on the record length naturally apply as much for JRIO as at other DMS interfaces.
The getBlockControl() method returns the block format stored in this parameter. This parameter corresponds to the BLKCTRL specification in DMS. The setBlockControl() method sets the block format in this parameter object. BLOCK_CONTROL_BY_PUBSET, BLOCK_CONTROL_DATA, BLOCK_CONTROL_NO, BLOCK_CONTROL_PAMKEY, BLOCK_CONTROL_DATA_2K and BLOCK_CONTROL_DATA_4K can be specified. This parameter is only of significance when new files are generated.
The getPrimarySpaceAllocation() method returns the value stored in this parameter for the primary space allocation in a file. The setPrimarySpaceAllocation() method sets the value for the primary space allocation of a file in this parameter object. This parameter corresponds to the first part of the SPACE specification in DMS.
The getSecondarySpaceAllocation() method returns the value stored in this parameter for the secondary space allocation in a file. The setSecondarySpaceAllocation() method sets the value for the secondary space allocation in a file in this Parameter object. This parameter corresponds to the second part of the SPACE specification in DMS.
The SAM access method enables a file to be opened simultaneous for read-only access by multiple applications. For this reason, shared update processing is not possible for SAM files.