Utilities Subroutines
System utilities - table lookups, conversions, system status
Subroutine count: 17
Table of Contents
VB_GETLISTVB_GETLIST.REV1VB_GETLIST2.REV1VB_ICONVVB_LOCATEVB_OCONVVB_READDICTVB_SYSTEMSTAT.REV1VB_TABLE_LOOKUP.REV1VB_TABLE_LOOKUP.REV2VB_TABLE_LOOKUP.REV2.BAKVB_TABLE_LOOKUP.REV2NEWVB_TABLE_LOOKUP.REV3VB_TABLE_LOOKUP.REV4VB_UNIX.COMMAND.REV1VB_WRITEDICTVB_WRITEDICT.REV1
VB_GETLIST
Signature: SUBROUTINE VB_GETLIST(FILENAME,FLD,WITHCLAUSE,RETMSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_GETLIST
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | List |
| Args | 4 |
| Description | Selects records from a specified table with an optional WHERE clause and returns a list of record IDs paired with a field value. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | FILENAME | in | Name of the UniData table to select from |
| 1 | FLD | in | Field number to read from each record (returned alongside ID) |
| 2 | WITHCLAUSE | in | Optional WITH clause for filtering (e.g. WITH F1 = ‘X’); if empty, selects all records |
| 3 | RETMSG | out | Field-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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | List |
| Args | 5 |
| Description | Returns 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | BSQL | in | BSELECT statement to execute against the active select list (required) |
| 1 | VSQL | in | Optional SQL SELECT statement to build the initial select list |
| 2 | VLIST | in | Optional field-marked list of record IDs (used if VSQL is empty) |
| 3 | DATA | out | Return array of selected data from the BSELECT |
| 4 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | List |
| Args | 4 |
| Description | Returns 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CMD | in | LIST command to execute (e.g. LIST ACTIVITY.LOG.1287 PROJECT PTI.EMP CONTACT.NO TOXML) |
| 1 | ENTLIST | in | Value-marked list of entity IDs (e.g. 05!001848, 12!0314, 03!10483) |
| 2 | RESULT | out | XML output from the LIST command execution |
| 3 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Utility |
| Args | 3 |
| Description | Wrapper around the UniBasic ICONV function. Converts an external format value to internal storage format using the specified conversion code. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | SUBJECT | in | Value to convert from external to internal format |
| 1 | CONVERT | in | Conversion code (e.g. D2/, MD2, etc.) |
| 2 | RESULT | out | Converted 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Utility |
| Args | 8 |
| Description | Wrapper 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | ELEMENT | in | The value to search for in the dynamic array |
| 1 | SEARCHSTRING | in | The dynamic array to search within |
| 2 | FIELD | in | Field (attribute) number to search in |
| 3 | VAL | in | Value position within the field (0 to search at field level) |
| 4 | SUBVAL | in | Subvalue position within the value (0 to search at value level) |
| 5 | SEARCHTYPE | in | Sort type for ordered locate (e.g. AL, AR, DL, DR); empty for unordered search |
| 6 | POS | out | Position where the element was found (or would be inserted) |
| 7 | FOUND | out | TRUE 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Utility |
| Args | 3 |
| Description | Wrapper around the UniBasic OCONV function. Converts an internal storage value to external display format using the specified conversion code. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | SUBJECT | in | Internal value to convert to external display format |
| 1 | CONVERT | in | Conversion code (e.g. D2/, MD2, MCT, etc.) |
| 2 | RESULT | out | Converted 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Inquiry |
| Args | 2 |
| Description | Reads 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | DICTFILE | in | Name of the table whose DICT to read (e.g. OPENWO) |
| 1 | DATA | out | Multi-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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Utility |
| Args | 2 |
| Description | Executes an arbitrary UniData command and captures its output. Generic command execution wrapper using EXECUTE … CAPTURING. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | COMMAND | in | UniData command string to execute (e.g. LIST.READU, STATUS, etc.) |
| 1 | RESULT | out | Captured 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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 7 |
| Superseded By | VB_TABLE_LOOKUP.REV4 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | |
| 1 | VFIELDNUM | in | |
| 2 | VFIELDNAME | in | |
| 3 | VSQL | in | |
| 4 | VSORT | in | |
| 5 | DATA | out | |
| 6 | MESSAGE | out |
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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 8 |
| Superseded By | VB_TABLE_LOOKUP.REV4 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | |
| 1 | VFIELDNUM | in | |
| 2 | VFIELDNAME | in | |
| 3 | VSQL | in | |
| 4 | VSORT | in | |
| 5 | VLIST | in | |
| 6 | DATA | out | |
| 7 | MESSAGE | out |
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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 8 |
| Superseded By | VB_TABLE_LOOKUP.REV2 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | |
| 1 | VFIELDNUM | in | |
| 2 | VFIELDNAME | in | |
| 3 | VSQL | in | |
| 4 | VSORT | in | |
| 5 | VLIST | in | |
| 6 | DATA | out | |
| 7 | MESSAGE | out |
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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | List |
| Args | 8 |
| Description | Generic 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | Table name to query (e.g. ACCOUNT.1287) |
| 1 | VFIELDNUM | in | Field number(s) to return, ’!’-delimited for two fields (e.g. 1 or 1!2) |
| 2 | VFIELDNAME | in | Dictionary field name(s) to return, ’!’-delimited (e.g. NAME!LOCATION) |
| 3 | VSQL | in | Optional SQL WITH clause for filtering (e.g. WITH F1 = ‘0001’) |
| 4 | VSORT | in | Optional sort clause (e.g. BY F1) |
| 5 | VLIST | in | Optional value-marked list of record IDs to restrict results |
| 6 | DATA | out | Return array: <1,n>=ID, <2,n>=description (title-cased) |
| 7 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 8 |
| Superseded By | VB_TABLE_LOOKUP.REV4 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | |
| 1 | VFIELDNUM | in | |
| 2 | VFIELDNAME | in | |
| 3 | VSQL | in | |
| 4 | VSORT | in | |
| 5 | VLIST | in | |
| 6 | DATA | out | |
| 7 | MESSAGE | out |
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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | List |
| Args | 8 |
| Description | Latest 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | VTABLE | in | Table name to query (e.g. ACCOUNT.1287) |
| 1 | VFIELDNUM | in | Field number(s) to return, ’!’-delimited for two fields (e.g. 1 or 1!2) |
| 2 | VFIELDNAME | in | Dictionary field name(s) to return, ’!’-delimited (e.g. NAME!LOCATION) |
| 3 | VSQL | in | Optional SQL WITH clause for filtering (e.g. WITH UC.NAME LIKE ADV…) |
| 4 | VSORT | in | Optional sort clause (e.g. BY UC.NAME) |
| 5 | VLIST | in | Optional value-marked list of record IDs to restrict results |
| 6 | DATA | out | Return array: <1,n>=ID, <2,n>=description (title-cased); or BSELECT raw output for field-name mode |
| 7 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Utility |
| Args | 2 |
| Description | Executes an OS-level (Unix/Linux) command via PCPERFORM and captures the output. Allows running shell commands from within UniData. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | COMMAND | in | OS shell command to execute (e.g. ls, df, etc.) |
| 1 | RESULT | out | Captured 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | CRUD |
| Args | 3 |
| Description | Writes 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | DICTFILE | in | Name of the table whose DICT to write to |
| 1 | ID | in | Dictionary record ID to update |
| 2 | DATA | in | New 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 5 |
| Description | Extended 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 REQTYPE | NEWFILE, SAVE, DELETE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | REQTYPE | in | Operation type: NEWFILE (create file), SAVE (write field), DELETE (remove record) |
| 1 | DICTFILE | in | Name of the table/file to operate on |
| 2 | RECID | in | Record ID in the dictionary (used for SAVE and DELETE) |
| 3 | FID | in | Field number to write to (used for SAVE) |
| 4 | NEWVAL | in | New 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