This general macro reads a record from a file into storage. An
option provides the user with the facility to read either the primary or
duplicate record.
This macro should only be used to read records from the online
database. It should not be used to access records on general files or
general data sets.
A block of storage is obtained by the control program and reference to it
is stored in the core block reference word (CBRW) at the specified entry
control block (ECB) data level or data event control block (DECB).
FINSC causes VFA to be searched for the record. If the record is in
VFA, it is forced out of VFA before the record is read from the specified
DASD.
Format
- label
- A symbolic name can be assigned to the macro statement.
- datalevel
- An ECB data level (D0-DF) that identifies the file address and core
block information for the I/O request.
- DECB=(reg)|label1
- The label or general register (R0-R7) containing the address of the
DECB, which specifies the file address and core block information for the I/O
request.
- P
- Find primary record.
- D
- Find duplicate record.
Entry Requirements
- R9 must contain the address of the ECB being processed.
- A block of storage must not be held by the ECB at the specified ECB data
level (datalevel) or DECB.
- A file address, record ID, and record code check (RCC) must be contained
in the file address reference word (FARW) for the specified ECB data level
(datalevel) or DECB.
Return Conditions
- Control is returned to the next sequential instruction.
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
- If this macro is called from a program running in 24-bit mode, the
condition code will be saved across this macro call. If the macro is
called from a program running in 31-bit mode, the condition code upon return
from this macro is unknown.
- The status of the operation is unknown.
- The contents of the CBRW at the specified ECB data level
(datalevel) or DECB is unknown.
- The FARW at the specified ECB data level (datalevel) or DECB is
unchanged.
Programming Considerations
- This macro can be executed on any I-stream.
- A check is made by the control program to determine if the ECB is not
holding a block of storage at the specified ECB data level or DECB, the file
address at the specified ECB data level or DECB is valid, and a duplicate
exists when it is requested. If either condition is violated, control
is transferred to the system error routine. In addition, the control
program verifies that the record ID at the specified ECB data level or DECB is
equal to the record ID in the record. If the record ID specified is
zero this check is not made. The RCC at the specified ECB data level or
DECB is checked with the RCC in the record. This check is not made if
the specified RCC is zero. If either check fails, an error code is
indicated in the ECB (see WAITC-Suspend Processing for ECB I/O Completion and Control Program (CP) Detected Errors).
- To ensure completion of the operation, a WAITC macro must be run.
After a WAITC macro is completed, the CBRW at the specified ECB data level or
DECB contains the core address of the record.
- In the event of a noncorrectable error, the Control Program will not
service the request from the alternate device (for example, a request for
duplicate failed, primary will not be tried).
- If the location of the data event control block specified by the DECB
parameter does not refer to a valid DECB, control is transferred to the system
error routine.
Examples
None.