WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
One of the following:
rfa = The RFA. (a6)
grfa = The global RFA (GRFA). (a10)
The RFA qualifier causes the FIND, READ, and WRITE statements to position to the specified RFA. However, the RFA qualifier on an UNLOCK statement allows a specified lock to be released.
Rfa is an a6 variable that has been obtained either by the GETRFA qualifier or the deprecated GETRFA subroutine.
Using GRFAs can help you implement optimistic locking. (See Optimistic locking technique for more information.)
If you’ve used GETRFA:grfa on a previous READ or READS statement and then saved off the GRFA that is returned, a READ or READS with the RFA qualifier can attempt to reacquire the same record. (For a relative file, you can use WRITE to write a record by GRFA without rereading it.) If a record has changed between reads (or before it is written), a “Record not same” error ($ERR_RECNOT) will result because the CRC no longer matches. Thus, on a READ the record will still be read, but on a WRITE the record will not be written. To retrieve the CRC portion of the GRFA, use the %GETCRC routine.
RFA:grfa can be used on the FIND statement for ISAM and relative files and on the READ and WRITE statements for ISAM, stream, sequential, relative, and block files. The CRC portion of the GRFA is ignored on the FIND statement, the UNLOCK statement, and the deprecated POSRFA routine for ISAM and relative files.
The following built-in types are available when declaring an RFA or GRFA variable.
- D_RFA_TYPE (defined as a6)
- D_GRFA_TYPE (defined as a10)