Utilities Subroutines

System utilities - table lookups, conversions, system status

Subroutine count: 17

Table of Contents


VB_GETLIST

Signature: SUBROUTINE VB_GETLIST(FILENAME,FLD,WITHCLAUSE,RETMSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_GETLIST

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args4
DescriptionSelects records from a specified table with an optional WHERE clause and returns a list of record IDs paired with a field value.

Arguments:

IndexNameDirectionDescription
0FILENAMEinName of the UniData table to select from
1FLDinField number to read from each record (returned alongside ID)
2WITHCLAUSEinOptional WITH clause for filtering (e.g. WITH F1 = ‘X’); if empty, selects all records
3RETMSGoutField-marked list of alternating ID and field-value pairs

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_GETLIST",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_GETLIST.REV1

Signature: SUBROUTINE VB_GETLIST(BSQL,VSQL,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_GETLIST.REV1

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args5
DescriptionReturns a field-delimited list of records and attributes using a BSELECT statement. Accepts either an SQL select or a pre-built list of record IDs, then executes a BSELECT to retrieve data.

Arguments:

IndexNameDirectionDescription
0BSQLinBSELECT statement to execute against the active select list (required)
1VSQLinOptional SQL SELECT statement to build the initial select list
2VLISTinOptional field-marked list of record IDs (used if VSQL is empty)
3DATAoutReturn array of selected data from the BSELECT
4MESSAGEoutError or status message

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_GETLIST.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_GETLIST2.REV1

Signature: SUBROUTINE VB_GETLIST2(CMD,ENTLIST,RESULT,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_GETLIST2.REV1

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args4
DescriptionReturns an XML document list of activity log records by intersecting entity cross-reference lists. Filters out stopwords and merges multiple entity ID lists before executing a LIST TOXML command.

Arguments:

IndexNameDirectionDescription
0CMDinLIST command to execute (e.g. LIST ACTIVITY.LOG.1287 PROJECT PTI.EMP CONTACT.NO TOXML)
1ENTLISTinValue-marked list of entity IDs (e.g. 05!001848, 12!0314, 03!10483)
2RESULToutXML output from the LIST command execution
3MESSAGEoutError message if validation fails

Tables Referenced: ACTIVITY.XREF.1287, STOPWORDS.1287

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_GETLIST2.REV1",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_ICONV

Signature: SUBROUTINE VB_ICONV(SUBJECT,CONVERT,RESULT)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_ICONV

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternUtility
Args3
DescriptionWrapper around the UniBasic ICONV function. Converts an external format value to internal storage format using the specified conversion code.

Arguments:

IndexNameDirectionDescription
0SUBJECTinValue to convert from external to internal format
1CONVERTinConversion code (e.g. D2/, MD2, etc.)
2RESULToutConverted internal value

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_ICONV",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_LOCATE

Signature: SUBROUTINE VB_LOCATE(ELEMENT,SEARCHSTRING,FIELD,VAL,SUBVAL,SEARCHTYPE,POS,FOUND)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_LOCATE

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternUtility
Args8
DescriptionWrapper around the UniBasic LOCATE statement. Searches for an element within a dynamic array at the specified field/value/subvalue level, with optional sort ordering.

Arguments:

IndexNameDirectionDescription
0ELEMENTinThe value to search for in the dynamic array
1SEARCHSTRINGinThe dynamic array to search within
2FIELDinField (attribute) number to search in
3VALinValue position within the field (0 to search at field level)
4SUBVALinSubvalue position within the value (0 to search at value level)
5SEARCHTYPEinSort type for ordered locate (e.g. AL, AR, DL, DR); empty for unordered search
6POSoutPosition where the element was found (or would be inserted)
7FOUNDoutTRUE if element was found, FALSE otherwise

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_LOCATE",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_OCONV

Signature: SUBROUTINE VB_OCONV(SUBJECT,CONVERT,RESULT)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OCONV

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternUtility
Args3
DescriptionWrapper around the UniBasic OCONV function. Converts an internal storage value to external display format using the specified conversion code.

Arguments:

IndexNameDirectionDescription
0SUBJECTinInternal value to convert to external display format
1CONVERTinConversion code (e.g. D2/, MD2, MCT, etc.)
2RESULToutConverted external display value

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OCONV",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_READDICT

Signature: SUBROUTINE VB_READDICT(DICTFILE,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_READDICT

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args2
DescriptionReads all dictionary records for a specified table and returns them as a multi-valued array with ID, type, location, conversion, name, format, and SM columns.

Arguments:

IndexNameDirectionDescription
0DICTFILEinName of the table whose DICT to read (e.g. OPENWO)
1DATAoutMulti-valued array: <n,1>=ID, <n,2>=Type, <n,3>=Loc, <n,4>=Conv, <n,5>=Name, <n,6>=Format, <n,7>=SM, <n,8>=Assoc

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_READDICT",
    "args":  {
                 "0":  ""
             }
}

VB_SYSTEMSTAT.REV1

Signature: SUBROUTINE VB_SYSTEMSTAT(COMMAND,RESULT)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SYSTEMSTAT.REV1

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternUtility
Args2
DescriptionExecutes an arbitrary UniData command and captures its output. Generic command execution wrapper using EXECUTE … CAPTURING.

Arguments:

IndexNameDirectionDescription
0COMMANDinUniData command string to execute (e.g. LIST.READU, STATUS, etc.)
1RESULToutCaptured text output of the command

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_SYSTEMSTAT.REV1",
    "args":  {
                 "0":  ""
             }
}

VB_TABLE_LOOKUP.REV1

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV1

PropertyValue
Status[X] deprecated
Args7
Superseded ByVB_TABLE_LOOKUP.REV4

Arguments:

IndexNameDirectionDescription
0VTABLEin
1VFIELDNUMin
2VFIELDNAMEin
3VSQLin
4VSORTin
5DATAout
6MESSAGEout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  ""
             }
}

VB_TABLE_LOOKUP.REV2

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV2

PropertyValue
Status[X] deprecated
Args8
Superseded ByVB_TABLE_LOOKUP.REV4

Arguments:

IndexNameDirectionDescription
0VTABLEin
1VFIELDNUMin
2VFIELDNAMEin
3VSQLin
4VSORTin
5VLISTin
6DATAout
7MESSAGEout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV2",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_TABLE_LOOKUP.REV2.BAK

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV2.BAK

PropertyValue
Status[X] deprecated
Args8
Superseded ByVB_TABLE_LOOKUP.REV2

Arguments:

IndexNameDirectionDescription
0VTABLEin
1VFIELDNUMin
2VFIELDNAMEin
3VSQLin
4VSORTin
5VLISTin
6DATAout
7MESSAGEout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV2.BAK",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_TABLE_LOOKUP.REV2NEW

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV2NEW

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args8
DescriptionGeneric table lookup returning ID and description pairs for combo-box population. Supports field number or dictionary name lookup, optional SQL filtering, sorting, and a pre-built ID list. Uses BSELECT for field-name mode.

Arguments:

IndexNameDirectionDescription
0VTABLEinTable name to query (e.g. ACCOUNT.1287)
1VFIELDNUMinField number(s) to return, ’!’-delimited for two fields (e.g. 1 or 1!2)
2VFIELDNAMEinDictionary field name(s) to return, ’!’-delimited (e.g. NAME!LOCATION)
3VSQLinOptional SQL WITH clause for filtering (e.g. WITH F1 = ‘0001’)
4VSORTinOptional sort clause (e.g. BY F1)
5VLISTinOptional value-marked list of record IDs to restrict results
6DATAoutReturn array: <1,n>=ID, <2,n>=description (title-cased)
7MESSAGEoutError message if something fails

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV2NEW",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_TABLE_LOOKUP.REV3

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV3

PropertyValue
Status[X] deprecated
Args8
Superseded ByVB_TABLE_LOOKUP.REV4

Arguments:

IndexNameDirectionDescription
0VTABLEin
1VFIELDNUMin
2VFIELDNAMEin
3VSQLin
4VSORTin
5VLISTin
6DATAout
7MESSAGEout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV3",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_TABLE_LOOKUP.REV4

Signature: SUBROUTINE VB_TABLE_LOOKUP(VTABLE,VFIELDNUM,VFIELDNAME,VSQL,VSORT,VLIST,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_TABLE_LOOKUP.REV4

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args8
DescriptionLatest revision of the generic table lookup. Returns ID and description pairs for combo-box population. Uses BSELECT for field-name mode with support for SQL filtering, sorting, and pre-built ID lists with company prefix handling.

Arguments:

IndexNameDirectionDescription
0VTABLEinTable name to query (e.g. ACCOUNT.1287)
1VFIELDNUMinField number(s) to return, ’!’-delimited for two fields (e.g. 1 or 1!2)
2VFIELDNAMEinDictionary field name(s) to return, ’!’-delimited (e.g. NAME!LOCATION)
3VSQLinOptional SQL WITH clause for filtering (e.g. WITH UC.NAME LIKE ADV…)
4VSORTinOptional sort clause (e.g. BY UC.NAME)
5VLISTinOptional value-marked list of record IDs to restrict results
6DATAoutReturn array: <1,n>=ID, <2,n>=description (title-cased); or BSELECT raw output for field-name mode
7MESSAGEoutError message if something fails

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_TABLE_LOOKUP.REV4",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  ""
             }
}

VB_UNIX.COMMAND.REV1

Signature: SUBROUTINE VB_UNIX.COMMAND(COMMAND,RESULT)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_UNIX.COMMAND.REV1

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternUtility
Args2
DescriptionExecutes an OS-level (Unix/Linux) command via PCPERFORM and captures the output. Allows running shell commands from within UniData.

Arguments:

IndexNameDirectionDescription
0COMMANDinOS shell command to execute (e.g. ls, df, etc.)
1RESULToutCaptured output of the shell command

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_UNIX.COMMAND.REV1",
    "args":  {
                 "0":  ""
             }
}

VB_WRITEDICT

Signature: SUBROUTINE VB_WRITEDICT(DICTFILE,ID,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_WRITEDICT

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternCRUD
Args3
DescriptionWrites the description (attribute 1) of a dictionary record. Reads the existing dict record, replaces it with the supplied data, and writes it back to field 1.

Arguments:

IndexNameDirectionDescription
0DICTFILEinName of the table whose DICT to write to
1IDinDictionary record ID to update
2DATAinNew description value to write to attribute 1 of the dictionary record

Tables Written: DICT (dynamic)

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_WRITEDICT",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_WRITEDICT.REV1

Signature: SUBROUTINE VB_WRITEDICT(REQTYPE,DICTFILE,RECID,FID,NEWVAL)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_WRITEDICT.REV1

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args5
DescriptionExtended dictionary writer with REQTYPE-driven operations: NEWFILE creates a new dynamic file, SAVE writes a field value to a dictionary record, DELETE removes a dictionary record.
Dangerous REQTYPENEWFILE, SAVE, DELETE

Arguments:

IndexNameDirectionDescription
0REQTYPEinOperation type: NEWFILE (create file), SAVE (write field), DELETE (remove record)
1DICTFILEinName of the table/file to operate on
2RECIDinRecord ID in the dictionary (used for SAVE and DELETE)
3FIDinField number to write to (used for SAVE)
4NEWVALinNew value to write (used for SAVE)

Tables Written: DICT (dynamic)

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_WRITEDICT.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  ""
             }
}


Last updated: 2026-02-05 11:29 PM