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.
| Request | Type | jBC |
|---|---|---|
| Authentication | 15 | none: the first request of a connection, see Agent protocol |
| OpenFile, CloseFile, ClearFile | 205, 206, 207 | OPEN, CLEARFILE |
| ReadRecord, ExistsRecord | 201, 204 | READ, READU, READL, with or without a LOCKED clause |
| WriteRecord | 202 | WRITE, WRITEU |
| DeleteRecord | 203 | DELETE |
| ReleaseRecordLock | 225 | RELEASE |
| SelectFile; SelectList Fetch, Commit, Close | 208; 230, 231, 232 | SELECT; the agent keeps the list and sends keys and records in pages |
| RemoteExecute | 220 | EXECUTE with CAPTURING, SETTING and RTNLIST |
| RemoteSubroutine | 209 | CALL |
| Conv | 223 | ICONV, OCONV |
| DateTime | 219 | DATE, TIME |
| ReadCommon | 221 | a named COMMON block |
| Begin, Commit, RollbackTransaction | 211, 212, 213 | TRANSTART, TRANSEND, TRANSABORT |
| XA Start, End, Prepare, Commit, Rollback | 214 to 218 | two-phase commit for an application server |
| StatementExecuteQuery, StatementFetch | 226, 227 | a jQL query |
| SwitchAccount | 224 | LOGTO another account |
| SetProperties | 229 | settings of the session, see below |
| Echo | 504 | nothing: 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:
| Name | Effect |
|---|---|
| env.NAME | sets the environment variable NAME in the session, as PUTENV does |
| allow_input | lets jBC code in the session ask the client for input |
| disable_output | stops sending terminal output to the client |
| action_timeout | the number of seconds a request may run; one that runs longer is stopped and the session ends |
| compression, compression_threshold | compress 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.