Previous Topic: Action=LOAD Class=COMMAND

Next Topic: Action=LOAD Class=PDOMAIN


Action=GET Class=TENTRY

Retrieves one or all entries from a table.

This statement has the following format:

&CONTROL SHRVARS=($VM)
-EXEC $CACALL      OPT=ACTION
                   ACTION=GET
                   CLASS=TENTRY
                   NAME=’APPL=application id
                           FIELD=fieldName
                           [VALUE=fullValue]’
                   [PARMS=’ACTIVE={YES | NO | ANY}’]
APPL=application id

A required parameter giving the identifier of the application.

FIELD=fieldName

A required parameter giving the name of the table.

VALUE=fullValue

An optional parameter giving the full value of the entry to be retrieved. If omitted, all entries in the table are returned.

ACTIVE={YES | NO | ANY}

An optional parameter that indicates which entries are to be retrieved from the table if the VALUE parameter is omitted.

YES

Only active table entries are to be retrieved. This is the default.

NO

Only inactive table entries are to be retrieved.

ANY

All table entries are to be retrieved.

Input Variables

This statement has no input variables.

Return Variables

This statement contains the following return variables:

&SYSMSG

System message. Contains the error message (for return code 8).

If a full value is supplied, the following variables are returned:

$VMABBR

The abbreviated value of the table entry.

$VMFULL

The full value of the table entry.

$VMDESC

The description of the table entry.

$VMTEXTn

The text fields of the table entry.

If a full value is not supplied, the following variables are returned:

$VMTOTAL

The total number of entries in the table.

$VMABBRn

The abbreviated value for each table entry.

$VMFULLn

The full value for each table entry.

$VMDESCn

The description of each table entry.

Feedback Codes

If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:

2

No data found

8

Processing error

10

Nesting level exceeded

Example

The following statements retrieve the entry $NDSYS from the Report Writer table:

&CONTROL SHRVARS
-EXEC $CACALL   OPT=ACTION +
                ACTION=GET +
                CLASS=TENTRY +
                NAME=‘APPL=$RW +
                      FIELD=APPL +
                      VALUE=$NDSYS’