Column1
Column2
Column3
...
Column100
with no real structure to the column names (Column1 etc is just for illustration)
I want to concatenate the values of all these columns together separated by @VM.
Right now I:
* create stage variables V1 - V100 (real names, keep them as short as possible
* drag my columns of interest to the stage variables to map them
* create stage variable DLM = @VM (makes changing the delimiter easier)
* stage variable CONCAT = V1:DLM:V2:DLM:V3:DLM:...:V100
Then do whatever I want to do with CONCAT.
I was hoping there would be a better way, as this code is a royal PITA!@# (Ray, you want me to spell it out?
![Wink :wink:](./images/smilies/icon_wink.gif)
I was hoping arrays might help.
As a frame of reference, this is how I would do it in SAS:
CONCAT = catx(@VM,of V: ) * all vars starting with V
CONCAT = catx(@VM,of V1-V100) * all vars named V#, in numeric naming sequence
CONCAT = catx(@VM,of V1--V100) * all vars between V1 and V100 in the program data vector
CONCAT = catx(@VM,of Column1--Column100) * skip copying the columns to stage variables altogether.
"of" is a keyword to the compiler saying what follows is a variable list.
Internally, all the DS compiler would have to do is support variable list source code tokenization, and build the variable list internally for me. I'm sure the compiled code is no different than me specifying:
CONCAT = catx(@VM,V1,V2,V3,...,V100)
but the compiler does the work for me
As an aside, what is the best way to get enhancement requests to IBM?