EGL library sysLib

The sysLib system library contains miscellaneous functions and one variable.
Table 1. sysLib system functions
Function Description
audit(record[, jid]) Writes a record to the CICS® journal or IMS™ log.
result = bytes(source) Returns the number of bytes in a named area of memory.
calculateChkDigitMod10 (text, checkLength, result) Places a modulus-10 check digit in a NUM variable or character string that begins with a series of numeric characters.
calculateChkDigitMod11 (text, checkLength, result) Places a modulus-11 check digit in a NUM variable or character string that begins with a series of numeric characters.
callCmd (commandString[, modeString]) Runs a system command and waits until the command finishes.
commit() Saves updates that were made to databases, WebSphere® MQ message queues, and CICS recoverable files since the last commit. When the call to the remote COBOL program involves a client-controlled unit of work, a generated Java™ program or wrapper also saves the updates done by a remote, CICS-based COBOL program (including updates to CICS recoverable files).
result = conditionAsInt (booleanExpression) Accepts a logical expression and returns a 1 if the expression is true, or a 0 if the expression is false.
convert (target, direction, conversionTable) Converts data between EBCDIC (host) and ASCII (workstation) formats or performs code-page conversion within a single format.
result = convertBidi (conversionTableName, stringToConvert) Converts bidirectional text between logical and visual order.
convertNumberToUnicodeNum (source, target) Converts a numeric variable into a special type of COBOL variable with UNICODE digits, retaining the sign of the number.
convertNumberToUnsignedUnicodeNum (source, target) Converts a numeric variable into a special type of COBOL variable with UNICODE digits, ignoring the sign of the number.
convertUnicodeNumToNumber (source, target) Converts the digits of a special type of COBOL UNICODE source variable into a numeric variable, retaining the sign of the UNICODE variable.
convertUnsignedUnicodeNumToNumber (source, target) Converts the digits of a special type of COBOL UNICODE source variable into a numeric variable, ignoring the sign of the UNICODE variable.
errorLog (text ) Copies text into the error log that the sysLib.startLog system function started.
result = getCmdLineArg (index) Returns the specified argument from the list of arguments with which the EGL program was involved. The specified argument is returned as a string value.
result = getCmdLineArgCount () Returns the number of arguments that were used to start the main EGL program.
result = getMessage (key [, insertArray]) Returns a message from the file that is referenced in the vgj.message.file Java runtime property.
result = getProperty(propertyName) Retrieves the value of a Java runtime property. If the specified property is not found, the function returns a null string ("").
result = maximumSize (arrayName) Returns the maximum number of rows that a dynamic array of variables can hold (the value of the maxSize array property).
purge (queueName) Deletes a CICS temporary storage queue.
rollback () Reverses updates that were made to databases, WebSphere MQ message queues, and CICS recoverable files since the last commit. The reversal occurs in any EGL-generated application.
setError (itemInError, msgKey{, itemInsert})

setError (this, msgKey{, itemInsert})

setError (msgText)

Associates a message with one of the following containers:
  • a field in a JSF handler
  • a field in a VGUIRecord
  • the JSF handler itself
setErrorForComponentID (componentID, msgKey [, msgInserts]) Associates a message with a field in a JSF handler, based on the ID of a component on the Web page.
setLocale (languageCode, countryCode [, variant]) Sets the locale in JSF handlers and in VGWebTransaction programs.
setRemoteUser (userID, passWord) Sets the userid and password that are used on calls to remote programs from Java programs.
result = size (arrayName) Returns the number of rows in the specified data table or the number of elements in the specified array. The array can be a structure field array, a static array of variables, or a dynamic array of variables.
startCmd (commandString[, modeString]) Runs a system command and does not wait until the command finishes.
startLog (logFile) Opens an error log. Text is written into that log every time your program invokes sysLib.errorLog.
verifyChkDigitMod10 (input, checkLength, result) Verifies a modulus-10 check digit in a NUM variable or character string that begins with a series of numeric characters.
verifyChkDigitMod11 (input, checkLength, result) Verifies a modulus-11 check digit in a NUM variable or character string that begins with a series of numeric characters.
wait (timeInSeconds) Suspends execution for the specified number of seconds.
writeStderr (textString) Writes the text string to stderr (Java) or to the COBOL output device.
writeStdout (textString) Writes the text string to stdout (Java) or to the COBOL output device.
Variable Description
currentException A dictionary that identifies the exception that was thrown most recently in the run unit.

Compatibility

Table 2. Compatibility considerations for sysLib
Platform Issue
Rich UI Only the following sysLib functions are supported:
  • conditionAsInt()
  • writeStdError()
  • writeStdOut()

Feedback