SAS中文论坛

标题: 一个比较棘手的问题 [打印本页]

作者: shiyiming    时间: 2009-8-25 00:22
标题: 一个比较棘手的问题
问题解决了,谢谢hopewell
作者: shiyiming    时间: 2009-8-25 02:13
标题: Re: 一个比较棘手的问题
[code:1k9958b6]data temp(drop=text);
        infile "d:\temp.txt" truncover;
        input text $ 1-39;
        retain date time;
        if scan(text,1,' ')='Tue' then do;
                date=input(scan(text,3)||scan(text,2)||scan(text,6),date9.);
                time=input(scan(text,4),time8.);
        end;
        if scan(text,2,'/')='home' then do;
                account=put(scan(text,1),$8.);
                pid=input(scan(text,2),best8.);
                start_time=input(scan(text,5),time8.);
        end;
        if account=' ' then delete;
        format date ddmmyy10. time start_time time8.;
run;[/code:1k9958b6]




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2