我下载了锐思数据库的资产负债表数据,把文件名字改为a1到a5,然后想把它导入SAS里,用了如下程序:
%macro bs;
%do i=1 %to 5;
Data a.bs(label="非金融行业资产负债表");
Infile "D:\sas\应计操纵和基于实际活动的操纵\bs\a&i..txt" delimiter = '09'x Missover Dsd lrecl=32767 firstobs=2 ;
Format Comcd $7.;
Format Stkcd $6.;
Format Lcomnm $100.;
Format Csrciccd1 $6.;
Format Csrcicnm1 $50.;
Format Csrciccd2 $6.;
Format Csrcicnm2 $50.;
Format Date YYMMDD10.;
Format Reportdt YYMMDD10.;
Format Conflg 1.;
Format Reporttype $3.;
Format Adjflg 1.;
Format Invtr COMMA23.2;
Format Fixass COMMA23.2;
Format Totass COMMA23.2;
Format Totlia COMMA23.2;
Format TotSHE COMMA23.2;
Informat Comcd $7.;
Informat Stkcd $6.;
Informat Lcomnm $100.;
Informat Csrciccd1 $6.;
Informat Csrcicnm1 $50.;
Informat Csrciccd2 $6.;
Informat Csrcicnm2 $50.;
Informat Date YYMMDD10.;
Informat Reportdt YYMMDD10.;
Informat Conflg 1.;
Informat Reporttype $3.;
Informat Adjflg 1.;
Informat Invtr COMMA23.2;
Informat Fixass COMMA23.2;
Informat Totass COMMA23.2;
Informat Totlia COMMA23.2;
Informat TotSHE COMMA23.2;
Label Comcd="公司代码";
Label Stkcd="股票代码";
Label Lcomnm="最新公司全称";
Label Csrciccd1="证监会门类行业代码";
Label Csrcicnm1="证监会门类行业名称";
Label Csrciccd2="证监会次类行业代码";
Label Csrcicnm2="证监会次类行业名称";
Label Date="日期";
Label Reportdt="报表日期";
Label Conflg="合并标识";
Label Reporttype="报表类型";
Label Adjflg="调整标识";
Label Invtr="存货";
Label Fixass="固定资产";
Label Totass="资产合计";
Label Totlia="负债合计";
Label TotSHE="所有者权益(股东权益)合计";
Input
Comcd $ Stkcd $ Lcomnm $ Csrciccd1 $ Csrcicnm1 $ Csrciccd2 $ Csrcicnm2 $ Date Reportdt Conflg Reporttype $ Adjflg Invtr Fixass Totass Totlia TotSHE ;
Run;
%end;
%mend;
%bs;
但是运行结束之后,生成的bs表格当中只有股票代码开头为6和9的股票数据,其他数据都没有被导入,这是什么原因呢?
请给位大侠相助!