Function to get a variable value by name

Hi Everybody,

Is there any function to get a variable value by its name?

Something like this:

color=“red”

IF GETVAL(“CLIENT-NUMBER”) EQ 0
WRITE ‘REQUIRED…’
END-IF

(…)[/color]

Do you mean the VAL function which can get the numeric value of an alpha field?

If you really wanted to just check for a null value, you could also check for a blank.

steve

No. I’m wondering if there’s a function that gets a variable name by a string parm and returns its value. Imagine you wanna make a generic validation subroutine that accesses previosly registered variables values by their names.

This is possible with the RUN statement, but it is unlikely that you’ll find the flexibility that you expect. Read the section called Dynamic Source Text Creation/Execution.

ps It is not necessary to post the same question in multiple threads.