Just wondering...
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000201956.htm
are you seeing any warning messages in the SAS log. ABS is the name of a SAS function.
doc for ABS function:
http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000245861.htm
cynthia
It says in the doc:
CAUTION:
Using the name of a SAS function as an array name can cause unpredictable results.
If you inadvertently use a function name as the name of the array, SAS treats parenthetical references that involve the name as array references, not function references, for the duration of the DATA step. A warning message is written to the SAS log.
As for your question about creating a new character variable, then this code shows how to use the VNAME function to grab the variable name of an array member.
[pre]
7714 data makearr;
7715 length newcharvar $15;
7716 set sashelp.class(obs=2);
7717 array allnum _numeric_;
7718 do i = 1 to dim(allnum);
7719 varname = vname(allnum(i));
7720 newcharvar = cats('_',put(_n_,2.0),'_',put(i,2.0),'_xxx_',trim(varname));
7721 putlog _n_= i= name= varname= newcharvar=;
7722 end;
7723
7724 run;
_N_=1 i=1 Name=Alfred varname=Age newcharvar=_1_1_xxx_Age
_N_=1 i=2 Name=Alfred varname=Height newcharvar=_1_2_xxx_Height
_N_=1 i=3 Name=Alfred varname=Weight newcharvar=_1_3_xxx_Weight
_N_=2 i=1 Name=Alice varname=Age newcharvar=_2_1_xxx_Age
_N_=2 i=2 Name=Alice varname=Height newcharvar=_2_2_xxx_Height
_N_=2 i=3 Name=Alice varname=Weight newcharvar=_2_3_xxx_Weight
NOTE: There were 2 observations read from the data set SASHELP.CLASS.
[/pre]