Have I lost my mind or is somethin wrong here?
data _null_;
cur_yr = year(today());
cur_day = day(today());
cur_mnth = month(today());
x= catx(put(cur_mnth, z2.), put(cur_day, z2.), put(cur_yr, z4.));
y = compress(put(cur_mnth, z2.)|| put(cur_day, z2.) || put(cur_yr, z4.));
put 'HERE ' cur_mnth cur_day cur_yr ;
put x=;
put y=;
call symput('rundat8', catx(put(cur_mnth, z2.), put(cur_day, z2.), put(cur_yr, z4.)));
run;
%put &rundat8 ;
Results in
HERE 1 28 2011
x=28012011
y=01282011
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.00 seconds
33 %put &rundat8 ;
28012011
How is the CATX reversing the order of the values?
Same result in 9.1 on Unix and 9.2 on WIN 7
... View more