- data a;
- input sastime a;
- cards;
- 38100 0
- 51840 0
- 53940 0
- 53940 0
- ;
- data b;
- set a;
- if sastime<input("14:59:00",time.) then a=1;
- run;
- proc iml;
- use work.a;
- read all into iml1;
- mattrib iml1 colname={'sastime' 'a'};
- do i=1 to 4;
- if iml1[ ,'sastime']<input("14:59:00",time.) then iml1[i,'a']=1;*这样写报错;
- /*if iml1[i,'sastime']<53940 then iml1[i,'a']=1;*这样写不报错;*/
- end;
- print iml1;
- quit;
------
22 200
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, (, ), +, ',', -, ^, {.
14:59:00是一个可变的值,如果每次都先找sas时间格式中对应的值53940会很麻烦。
请问如何在IML中读取hh:mm:ss格式的值,谢谢!



雷达卡




京公网安备 11010802022788号







