Hi,
Can anyone help me with a sample where I can move values from a Dynamic variable to a defined array correctly?
Hi,
Can anyone help me with a sample where I can move values from a Dynamic variable to a defined array correctly?
It is not clear to me exactly what you wish to do, but try this for a start.
DEFINE DATA LOCAL
1 #DYN (A) DYNAMIC INIT <'ONEtwoTHREE'>
1 #ARR (A10/5)
END-DEFINE
MOVE SUBSTR (#DYN, 1, 3) TO #ARR (1)
MOVE SUBSTR (#DYN, 4, 3) TO #ARR (2)
MOVE SUBSTR (#DYN, 7, 5) TO #ARR (3)
PRINT '=' #DYN
DISPLAY (ES=T) #ARR (*)
END
Page 1 10/10/19 08:18:28
#ARR
----------
#DYN: ONEtwoTHREE
ONE
two
THREE
Or if your dynamic variable is delimited, the SEPARATE statement would work.