This general macro assigns the entry control block (ECB) exclusive control
of the specified record and then reads the record from the 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 ECB data level or data event control block (DECB).
The requested record can be contained in the virtual file access
(VFA).
The control program will queue this request if the record is being held by
another entry. All succeeding requests to hold this record are queued
until the record is unheld.
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.
- 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. 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 executed to set up the file address before FINHC
is used to access a general data set record.
- The entry must not be holding the 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 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 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, 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 is completed, a WAITC macro must be
run. After a WAITC macro, the CBRW at the specified ECB data level or
DECB contains the address of the record and the record is held.
- You cannot call the FINHC 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
- FINHC record x.
- TPF transaction services processing affects FINHC macro processing in the
following ways:
- Additional checks must be made to determine if the file address is held at
the program level or at the commit scope level. Requests for file
addresses held at the program level are queued as usual. Requests for
file addresses held outside of the commit scope are queued. Requests
for file addresses held within the commit scope are serviced.
- 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 a deadlock condition is detected on the ECB that issued this macro, a
deadlock user exit is called with the ECB address and input/output block (IOB)
address as an input. If the return code from the user exit is 0,
processing continues as if the user exit was never called. If the
return code from the user exit is 4, the ECB is scheduled to exit with dump
D9. If the return code from the user exit is 8, CE1SUD or IDECSUD, and
CE1SUG of the ECB will be set to CJCSUHRD and CJCSUDLK (that is,
X'81') and the waiting IOB is removed from the system.
- 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.