LTAB_COLUMNS
This command enables you to enquire and return the number of columns in the specified logical table.
The format of the command is as follows:
LTAB_COLUMNS 'Logical table name'
An example of the command is given below:
LTAB_COLUMNS 'logtable1'
LTAB_COLUMNS requires a parameter, which is the name of the logical table to enquire. In this example, the logical table is logtable1
As the LTAB_COLUMNS command returns a value, this value has to be assigned to a variable, as shown in the following example. A typical use of the LTAB_COLUMNS command is:
LET num_columns (LTAB_COLUMNS 'logtable1')
which means the LTAB_COLUMNS command returns the number of columns in the logical table logtable1 and then LET assigns it to the macro variable num_columns.
The returned value is a number.