要把如图下面各变量值读入,各变量值从原txt第三行开始读入。但是,问题是,现在我要再读入一个变量(Scode)的值,其值为原txt文件第一行的前六个字符,该怎么做?(不能直接赋值:Scode=600000,因为我有上百个这样的文件要处理)
下面是我原来的代码(只读了第三行后的数据)
Data work.test(label="日股票综合数据");
Infile 'M:\sh600000.txt' delimiter = '09'x Missover Dsd lrecl=32767 firstobs=3 ;
Format Date YYMMDD10.;
Format Oprice 12.2;
Format Hprice 12.2;
Format Lprice 12.2;
Format Cprice 12.2;
Format Vol 12.2;
Format VOLmoney 12.2;
Informat Date YYMMDD10.;
Informat Oprice 12.2;
Informat Hprice 12.2;
Informat Lprice 12.2;
Informat Cprice 12.2;
Informat Vol 12.2;
Informat Volmoney 12.2;
Label Date="日期";
Label Oprice="开盘价";
Label Hprice="最高价";
Label Lprice="最低价";
Label Cprice="收盘价";
Label Vol="成交量";
Label Volmoney="成交金额";
Input
Date Oprice Hprice Lprice Cprice Vol Volmoney;
Run;


雷达卡





京公网安备 11010802022788号







