考虑以下:
data;
format x datetime19.;
x=datetime();
flag='FIRST';
do x=datetime() to x+10 by 1;
output;
flag='';
end;
proc sql noprint;
select x into : test1 from &syslast where flag='FIRST';
select max(x) into: test2 from &syslast;
%put now we see that &test1 is in a different format to &test2;
data _null_; set;
put x=; /* formatted */
call symput('test3',x);
call symput('test4',max(x,sum(x+1000)));
stop;
run;
%put The data step is more consistent - &test3 = &test4;
对我来说似乎不一致。为什么 proc sql 在这种情况下保留格式?这种行为是否记录在案?