(CVAL('PORTS'))
Returns the list of all available ports, separated by comma, on that workstation.
Example:
SET VAR vAvailablePorts = (CVAL('PORTS'))
SHOW VARIABLE vAvailablePorts
Will return the text string with a list of all ports that are available on that workstation. Each item in the list will be separated by comma (or the database character settings for comma).