今天联系 SAS MACRO. 发现错误如下:
ERROR: The SAS System was unable to open the macro library.
ERROR: Unable to read header information for catalog WORK.SASMACR.
ERROR: A dummy macro will be compiled.
472 run;
473 %MACRO sample;
474 PROC SORT DATA = flowersales;
475 BY DESCENDING Quantity;
476 PROC PRINT DATA = flowersales (OBS = 5);
477 FORMAT SaleDate WORDDATE18.;
478 TITLE 'Five Largest Sales';
479 %MEND sample;
ERROR: No matching %MACRO statement for this %MEND statement.
480 %sample
-
180
WARNING: Apparent invocation of macro SAMPLE not resolved.
ERROR 180-322: Statement is not valid or it is used out of proper order.
SAS CODE 如下:
data flowersales;
input customerid $ @6 saledate mmddyy10. @17 variety $9. quantity;
datalines;
240W 02-07-2003 Ginger 120
240W 02-07-2003 Protea 180
356W 02-08-2003 Heliconia 60
356W 02-08-2003 Anthurium 300
188R 02-11-2003 Ginger 24
188R 02-11-2003 Anthurium 24
240W 02-12-2003 Heliconia 48
240W 02-12-2003 Protea 48
356W 02-12-2003 Ginger 240
run;
%MACRO sample;
PROC SORT DATA = flowersales;
BY DESCENDING Quantity;
PROC PRINT DATA = flowersales (OBS = 5);
FORMAT SaleDate WORDDATE18.;
TITLE 'Five Largest Sales';
%MEND sample;
%sample
run;
请大哥大姐们指教,小弟刚学SAS不久.多谢.