Agent requests

The requests fall into a few groups. The type is the number that starts the request object; the jBC column gives the statement whose work a request does.

RequestTypejBC
Authentication15none: the first request of a connection, see Agent protocol
OpenFile, CloseFile, ClearFile205, 206, 207OPEN, CLEARFILE
ReadRecord, ExistsRecord201, 204READ, READU, READL, with or without a LOCKED clause
WriteRecord202WRITE, WRITEU
DeleteRecord203DELETE
ReleaseRecordLock225RELEASE
SelectFile; SelectList Fetch, Commit, Close208; 230, 231, 232SELECT; the agent keeps the list and sends keys and records in pages
RemoteExecute220EXECUTE with CAPTURING, SETTING and RTNLIST
RemoteSubroutine209CALL
Conv223ICONV, OCONV
DateTime219DATE, TIME
ReadCommon221a named COMMON block
Begin, Commit, RollbackTransaction211, 212, 213TRANSTART, TRANSEND, TRANSABORT
XA Start, End, Prepare, Commit, Rollback214 to 218two-phase commit for an application server
StatementExecuteQuery, StatementFetch226, 227a jQL query
SwitchAccount224LOGTO another account
SetProperties229settings of the session, see below
Echo504nothing: the agent sends the bytes back

The responses are fewer. Most record and file requests are answered with one kind of response, which holds a status, a record or other data, and a select list when there is one. The status is what the jBC statement would have taken: 1 when the record was read or written, 0 when it was not there, 2 when it was locked by another session.

SetProperties sets values of the session by name:

NameEffect
env.NAMEsets the environment variable NAME in the session, as PUTENV does
allow_inputlets jBC code in the session ask the client for input
disable_outputstops sending terminal output to the client
action_timeoutthe number of seconds a request may run; one that runs longer is stopped and the session ends
compression, compression_thresholdcompress messages from this size up

The JDBC driver has requests of its own, to compile, run and fetch SQL statements and to call subroutines as stored procedures. They go through the SQL support of TAFC; see Embedded SQL for jBC.