This general macro reads a record from a file into storage. 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 time.
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 entry control block (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
data event control block (DECB), which specifies the file address and core
block information for the I/O request.
- 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 data base. N is the default.
- 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 FARW for the specified ECB data level (datalevel) or
DECB.
- The GDSRC macro must be run to set up the file address before FINDC is
used to access a general data set record.
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 file address reference word (FARW) at the specified ECB data level
(datalevel) or DECB is unchanged.
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 if 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 verified 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 for more information.)
- To ensure that the operation was completed, a WAITC macro must be
run. After a WAITC macro, the CBRW at the specified ECB data level or
DECB contains the storage address of the record.
- You cannot call the FINDC 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
- FINDC record x.
- TPF transaction services processing affects FINDC 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. The DASD surface
remains unchanged.
- 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.