File and database (system words)
File and database words enable programs to access or manipulate system and database resources, as shown in the next table.
System word/Usage Description recordName.resourceAssociation recordName.resourceAssociation = "myFile"Contains the system resource name associated with the record recordName and allows for a dynamic change to that name sysLib.commit sysLib.commit()Calls services to save recoverable file, database, and message queue updates since the last commit sysLib.connect sysLib.connect (database, userID, password, disconnectOption, isolationLevel)Allows a program to connect to a database at run time sysLib.connectionService sysLib.connectionService (userID, password, serverName, product, release, connectionOption)Allows a program to connect or disconnect to a database at run time and receives (optionally) the database product name and release level; but this function is supported only when you have requested compatibility with VisualAge Generator sysLib.disconnect sysLib.disconnect (database)Disconnects from the specified database or (if no database is specified) from the current database sysLib.disconnectAll sysLib.disconnectAll()Disconnects from all the currently connected databases sysLib.queryCurrentDatabase sysLib.queryCurrentDatabase (product, release)Returns the product and release number of the currently connected database sysLib.rollback sysLib.rollback()Calls system services to back out recoverable file, database, and message queue updates since the last commit point sysLib.setCurrentDatabase sysLib.setCurrentDatabase (database)Makes the specified database the currently active one sysVar.commitOnConverse sysVar.commitOnConverseDetermines whether to cause a commit and a release of resources in a text application, before a non-segmented program issues a converse statement sysVar.errorCode sysVar.errorCodeReceives a status code after any of the following events:
- The invocation of a call statement, if that statement is in a try block
- An I/O operation on an indexed, MQ, relative, or serial file
- The invocation of almost any system function in these cases--
- The invocation is within a try block; or
- The program is running in VisualAge Generator Compatibility mode and sysVar.handleSysLibErrors is set to 1
(For an overview that includes details on sysVar.errorCode, see Exception handling.)
sysVar.mqConditionCode sysVar.mqConditionCodeContains the completion code from an MQSeries API call following an add or scan I/O operation for an MQ record sysVar.sqlca sysVar.sqlcaContains the entire SQL communication area (SQLCA) returned for the last SQL I/O operation sysVar.sqlcode sysVar.sqlcodeContains the return code for the most recently completed SQL I/O operation sysVar.sqlerrd sysVar.sqlerrd[index]Is a static 6-element array, where each element contains the corresponding SQL communication area (SQLCA) value that was returned from the last SQL I/O option sysVar.sqlerrmc sysVar.sqlerrmcContains the substitution variables for the error message associated with the return code in sysVar.sqlcode sysVar.sqlIsolationLevel sysVar.sqlIsolationLevelIndicates the level of independence of one database transaction from another sysVar.sqlState sysVar.sqlStateContains the SQL state value for the most recently completed SQL I/O operation sysVar.sqlwarn sysVar.sqlwarn[index]Is a static 11-element array, where each element contains a warning byte returned in the SQL communications area (SQLCA) for the last SQL I/O operation and where the index is one greater that the warning number in the SQL SQLCA description; sqlwarn[2], for example, refers to SQLWARN1
Related concepts
MQSeries support
SQL support
Related reference
EGL statements
Exception handling
Function invocations
System words
System words in alphabetical order