The operation to be performed by the handler is specified
by the rpgOperation subfield.
Each operation has a description of the operation's
meaning in terms of RPG operation codes, and the actions that the
handler must perform to fulfill the operation.
The name of the
constant that defines the operation is followed by the numeric value
of the constant in parentheses. This numeric value is provided for
debugging purposes only; handler providers should use the named constant
within their code.
QrnOperation_CHAIN (9)
RPG operation |
Handler action |
- If the keyedFile subfield
is '0', the operation is random retrieval from a file by relative record
number.
- Otherwise, the operation is random retrieval from a file by key.
|
- Locate the record specified by the search argument.
- If the record is available, provide the data and set the found subfield
to '1'.
Otherwise, set the found subfield
to '0'.
- See Using search argumentsfor more information on using
search arguments.
- See Handling input datafor more information on providing
input data.
Remember: The input data for a subfile record contains
both input and output fields. The handler must retain the values of
the output fields when the record is written so that it can provide
the values of the output fields for subsequent input operations.
|
QrnOperation_CLOSE (18)
RPG operation |
Handler action |
Implicit or explicit close of the file. See When the Open-Access file is closed for
information on when a file is closed by RPG. |
End the interaction with the resource or device. |
QrnOperation_DELETE (16)
RPG operation |
Handler action |
Delete record by relative record number or key |
Delete the record specified by the search argument.
See Using search argumentsfor more information on using search arguments.
|
QrnOperation_DELETE_CURRENT
(19)
RPG operation |
Handler action |
Delete the current record |
Delete the most recently input record if it
is locked, or set the status to a failing value if it is not locked.
|
QrnOperation_EXFMT (10)
RPG operation |
Handler action |
Write and read a record format from a user-interface
file |
- Present the output data to the user including any subfile records
associated with the record format
- Receive the input data from the user, including input data for
any subfile records associated with the record format
- Provide the input data
- If there are any subfile records associated with the record format
- See Handling input datafor more information on providing
input data.
- See Handling output datafor more information on using
output data.
|
QrnOperation_FEOD (17)
RPG operation |
Handler action |
Force end of data |
Set the end-of-file condition |
QrnOperation_OPEN (1)
RPG operation |
Handler action |
Implicit or explicit OPEN operation |
Initialize the interaction with the resource
or device. |
QrnOperation_POSITION_END
(3)
RPG operation |
Handler action |
SETLL *END |
Set the file cursor to the end of the file. |
QrnOperation_POSITION_START
(2)
RPG operation |
Handler action |
SETLL *START |
Set the file cursor to the beginning of the
file. |
QrnOperation_READ (4)
RPG operation |
Handler action |
- Implicit or explicit sequential input operation for a database
file or record format.
- Implicit or explicit input operation for a user-interface file
or record format.
|
- Move the file cursor forward to the next record.
- Provide input data or set the eof subfield
to '1'.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_READC (5)
RPG operation |
Handler action |
Read next changed subfile record |
- Move the file cursor forward to the next changed record.
- Provide data or set the eof subfield
to '1'.
- See Handling input datafor more information on providing
input data.
Remember: The input data for a subfile record contains
both input and output fields. The handler must retain the values of
the output fields when the record is written so that it can provide
the values of the output fields for subsequent input operations.
|
QrnOperation_READE (6)
RPG operation |
Handler action |
Read the next record if its key is equal to
the search argument |
- Move the file cursor forward to the next record.
- Provide input data if the key of the record matches the search
argument, or set the eof subfield
to '1'.
- See Using search argumentsfor more information on using
key data.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_READE_CURRENT
(20)
RPG operation |
Handler action |
Read equal key, with no search argument specified |
- Move the file cursor forward to the next record.
- Provide data if the record has the same key as the previously
current record, or set the eof subfield
to '1'.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_READP (7)
RPG operation |
Handler action |
Sequential read previous operation |
- Move the file cursor backward to the previous record.
- Provide input data or set the eof subfield
to '1'.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_READPE (8)
RPG operation |
Handler action |
Read the previous record if its key is equal
to the search argument |
- Move the file cursor backward to the previous record.
- Provide input data if the key of the record matches the search
argument, or set the eof subfield
to '1'.
- See Using search argumentsfor more information on using
key data.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_READPE_CURRENT
(21)
RPG operation |
Handler action |
Read equal key previous, with no search argument
specified |
- Move the file cursor backward to the previous record.
- Provide data if the record has the same key as the previously
current record, or set the eof subfield
to '1'.
- See Handling input datafor more information on providing
input data.
|
QrnOperation_SETGT (11)
RPG operation |
Handler action |
Set greater than |
- Set the file cursor to the first record greater than the search
argument.
- Set the found subfield
to '1' if there is such a record.
- See Using search argumentsfor more information on using
search arguments.
|
QrnOperation_SETLL (12)
RPG operation |
Handler action |
Set lower limit |
- Set the file cursor to the last record less than or equal to the
search argument.
- Set the found subfield
to '1' if there is such a record.
- Set the equal subfield
to '1' if the record is an exact match for the search argument.
- See Using search argumentsfor more information on using
search arguments.
|
QrnOperation_UNLOCK (13)
RPG operation |
Handler action |
Unlock record |
Unlock the most recently input record if it
is locked, or set the status to a failing value if it is not locked. |
QrnOperation_UPDATE (14)
RPG operation |
Handler action |
Update the current record |
Update the most recently input record if it
is locked, or set the status to a failing value if it is not locked.
See Handling output datafor more information on using output data. |
QrnOperation_WRITE (15)
RPG operation |
Handler action |
Write record |
- If the record is a subfile record, retain the output data so it
can be returned as part of the data on a subsequent QrnOperation_READC or QrnOperation_CHAIN.
- If the record is not a subfile record, output the data to the
device or resource.
- See Handling output datafor more information on using
output data.
|