‎2006 Oct 11 4:25 PM
Hello every body,
here is static declaration:
Data var type C length 10.
i am trying to create a type at run time with following statement:
create data var type ( 'C' ).
the above statement will create a variable of type char with default length.
what if i want to specify the length (10)?
or in case of P type how will i set value for decimal.
‎2006 Oct 11 4:31 PM
Hi,
Why don't you use the Filed Symbols if you want the Runtime types
Regards
Sudheer
‎2006 Oct 11 4:44 PM
‎2006 Oct 11 4:52 PM
I agree with Sudheer..Field-Symbols are the best option and there are meant for the same.
Field-Symbols : <F>.
start-of-selection.
assign (var) to <F>.
After the above statement <F> has the value and type of variable VAR.
Considering your example...
assign (var) to <F>.
<F> = value.
should do the trick.
Regards
Anurag
Message was edited by: Anurag Bankley
‎2006 Oct 11 4:46 PM
‎2006 Oct 11 4:52 PM
Folks,
I have:
data: dataref type ref to data.
field-symbols <anyType> type any.
data: value type string.
data: var type c length 10.
value = '5112912340'.
create data dataref type ('c').
assign dataref->* to <anytype>.
<anyType> = value.
dataref is of type C but will be of length (1),, how can i make it of length (10)???
Thanks