This general macro reads a record from a file into storage and waits for
completion. 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).
The requested record can be contained in the virtual file access
(VFA).
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.
- label2
- The label of an operational program error routine within the current
program segment must be specified.
- GDS
- Specify one of the following:
- N
- The file address in the specified ECB data level or DECB is for a record
from the online database.
- Y
- The file address in the specified ECB data level or DECB is for a record
on either a general file or a general data set.
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.
- The GDSRC macro must be executed to set up the file address before FINWC
is used to access a general data set record.
Return Conditions
- The contents of R14 and R15 are unknown. The contents of all other
registers are preserved across this macro call.
- The condition code that is returned from this macro cannot be
predicted.
- If no I/O hardware errors or unusual conditions have occurred, control is
returned to the next sequential instruction. Otherwise, control is
returned to the address specified by the variable label2.
- All pending input operations, including this request, are completed for
this ECB. The status of output requests (except the FILNC macro) is
unknown.
- The core block reference word (CBRW) specified by datalevel or
DECB contains the address of the record.
- The FARW at the specified ECB data level (datalevel) or DECB is
unchanged.
- For I/O hardware errors, the system error routine has taken a storage dump
and informed CRAS.
Programming Considerations
- This macro can be run 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 and the
file address contained at the specified ECB data level or DECB is
valid. 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, control is transferred to the specified
operational program error routine (label2).
- An immediate return is made to the user program if all input/output
operations are completed at macro time.
- Following use of this macro, control may be transferred to the current
program segment for processing of another entry.
- The execution of this macro will reset the 500-millisecond program
timeout.
- If any I/O hardware errors or unusual conditions have occurred, detailed
information concerning the error has been stored in the ECB for each I/O level
and DECB.
- You cannot call the FINWC macro on a record that is part of the suspended
commit scope for an ECB. The following sequence will cause a system
error:
- TXBGC
- FILEC record x
- TXSPC
- FINWC record x.
- TPF transaction services processing affects FINWC macro processing in the
following ways:
- If a system error occurs because of one of the previous considerations,
processing ends as if a TXRBC macro was called.
- Finds from general files or general data sets are not considered part of
the commit scope and are not affected by commit scope processing.
- The TPF system first searches in the commit scope set for the
record. If the record is not found, normal DASD retrieval takes place
from VFA or the DASD surface.
- 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.