EGL library vgLib

The vgLib system functions are shown in the following table:

Table 1. vgLib system functions
System function/Invocation Description
result = compareBytes (var1, var1SubIndex, var1SubLength, var2, var2SubIndex, var2SubLength) Compares substrings within var1 and var2, and returns an INT (-1, 0, or 1) to indicate which of the two is greater.
result = compareNum (var1, var2) Compares the contents of two numeric variables of the same type and returns an INT (-1, 0, or 1) to indicate which of the two is greater.
result = compareStr (var1, var1SubIndex, var1SubLength, var2, var2SubIndex, var2SubLength) Compares substrings within var1 and var2 according to the local code page, and returns an INT (-1, 0, or 1) to indicate which of the two is greater.
result = concatenate (target, source) Concatenates two character variables.
result = concatenateBytes (target, source) Concatenates two character variables without regard to content.
result = concatenateWithSeparator (target, source, separator) Concatenates two character variables with separator characters between them.
connectionService (userID, password, serverName [, product, release [, connectionOption]])
  • Allows a program to connect to or disconnect from a database at run time.
  • Optionally receives the database product name and release level.
copyBytes (target, targetSubIndex, targetSubLength, source, sourceSubIndex, sourceSubLength) Copies one value to another.
copyStr (target, targetSubIndex, targetSubLength, source, sourceSubIndex, sourceSubLength) Copies characters from one variable to another.
result = findStr (source, sourceSubIndex, sourceSubLength, searchString) Searches for the first occurrence of a substring in a string.
result = floatingDifference (minuend, subtrahend) Converts two numbers to double-precision floating-point type, subtracts the subtrahend from the minuend, and returns the difference.
result = floatingMod (numerator, denominator) Returns the floating-point remainder of numerator divided by denominator.
result = floatingProduct (multiplicand, multiplier) Returns the floating-point product of multiplicand and multiplier.
result = floatingQuotient (numerator, denominator) Returns the floating-point quotient of numerator divided by denominator.
result = floatingSum (addend1, addend2) Returns the floating-point sum of addend1 and addend2.
result = getVAGSysType () Identifies the target system in which the program is running.
setSubStr (target, targetSubIndex, targetSubLength, source) Replaces each character in a substring of target with the source character.
startTransaction (request [, prID [, termID] ] ) Invokes a main program asynchronously and passes a record.
VGTDLI(func CHAR(4), pcbindex SMALLINT parms... ANY) Uses the CBLTDLI interface to invoke a DL/I function directly.

Feedback