Transact
Transact_Select
(SWI &4FC05)
Builds a result set for future reading by the client's application, the way the result set is built depends on the session's transaction mode (DIRTY_READ
, READ_COMMITED
ou READ_REPEATABLE1
).
On entry
- R0 = External session ID as returned by
Transact_CreateSession
;
- R1 = Data file's external ID (NULL or pointer to the pathname of the file);
- R2 = Pointer to internal ID for the file to be accessed;
- R3 = Start of the zone to select (offset of the first byte from the beginning of the file);
- R4 = End of the zone to select (offset of the last byte from the beginning of the file + 1);
- R5 = Cursor flag (
ALLOW_BACKWARD
=1, FORWARD_ONLY
=0).
On exit
- R0 = Cursor external ID (to be used in subsequent
Transact_Fetch
/ Transact_AllDone
requests)
- All other registers are preserved
Possible errors
- &812B00 Busy (not yet implemented in this release)
- &812B01 Unknown session
- &812B02 Unknown object
- &812B05 Invalid parameters
- &812B04 Not enough memory to service this request
- &812B08 Cursor in use
Additional note
Typically the sequence of calls to submit to the engine foolows this scheme:
- Call
Transact_Select
or Transact_SelectForUpdate
once to build the result set;
- Depending about the amount of data involved in the
Transact_Select
operation, call as many Transact_Fetch
request as necessary;
- As you have read all the data in the result set or before that (meaning the application is not interested any more in the result set data), call
Transact_AllDone
to renitialize the result set to a state ready for a subsequent Transact_Select
request.