This general macro is provided to convert a relative record number (RRN)
into a file address (CCHR format) to access a general data set record.
Format
- label
- A symbolic name can be assigned to the macro statement.
- datalevel
- A file address reference word (FARW) and file address extension word
(FAXW) (D0-DF).
- DECB=(reg)|label1
- The label or general register (R0-R7) containing the address of the
data event control block (DECB) that identifies the FARW and FAXW.
- SIZE
- The record size of the data set. The default value is 4.
Valid values are:
- L
- Large (1055 bytes)
- S
- Small (381 bytes)
- U
- Undefined
- 4
- 4KB (4095 bytes).
The SIZE = U parameter is used for non-TPF data sets, such as OS data
sets. When SIZE = U is specified, the data sets are divided into 4KB
allocations. If the data set was not defined by the user to 4KB
allocations, any additional records at the end of the tracks will not be
addressable.
- WORK
- The location where the RRN of the desired record within the data set is
specified. The default is NO.
- NO
- The RRN is in the FARW extension.
- YES
- The RRN is in the user's work area.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- R14 must contain the address of a 16-byte field. This field must
contain a 1-16 character data definition name. If the data
definition name is less than 16 bytes, then it must be left-justified within
this field and the remaining bytes padded with blanks.
- When the WORK=NO parameter is specified, field CE1FXx of the ECB data
level or field IDECFX0 of the DECB must contain the RRN of a desired record in
the data set.
- When the WORK=YES parameter is specified, a 4-byte field immediately
following the data set name field must contain the RRN of a desired
record.
Return Conditions
- Control is returned to the next sequential instruction.
- The contents of R15 are unknown. The contents of all other
registers are preserved across this macro call.
- Normal Return
- The contents of R14 are set to zero.
- Field CE1FXx of the ECB data level or field IDECFX0 of the DECB specified
will contain a file address (in CCHR format) of the desired record in the data
set as specified by the user via the WORK parameter.
- Note:
- When the RRN specified is zero, the address returned in field CE1FXx or field
IDECFX0 is the address of the first record of the data set.
- Error Return
- R14 is set to an error return code. Depending on the error
condition, the fields in the ECB or DECB may or may not be changed.
Error return codes are:
- 4
- The RRN is not valid (data set). The CE1FXx field for this ECB data
level or the IDECFX0 field of the DECB remains unchanged.
- 8
- The RRN is not valid (volume). The CE1FXx field for this ECB data
level or the IDECFX0 field of the DECB remains unchanged.
- 12
- This is the missing volume sequence number. ECB or DECB fields are
unpredictable.
- 16
- The requested data set was not mounted. ECB or DECB fields are
unchanged.
- 24
- The Device Dependent Table was not found. ECB or DECB fields are
unchanged.
Programming Considerations
- This macro can be run on any I-stream.
- Except for the record ID and RCC portions of the FARW, the data inserted
into the FARW by the control program must not be altered.
Examples
None.