Question

Is there a way to dynamically reference a variable? Apparently value() does not work on a variable reference.

def var export-columns as char extent.
def var i as int.

def var my-columns as char extent ["column1, column2"].

export-columns = value("my-columns").

do i = 1 to extent(export-columns):
  put export-columns[i].
end.
Was it helpful?

Solution

The only way to dynamically access variables is if they're in a temp-table. local variables cannot be accessed dynamically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top