具体如下,
把如下的宏保存在Sasuser.Mymacs下
- %macro PrintClass;
- proc print data=sashelp.class;
- run;
- %mend;
- filename PrintClass Catalog 'Sasuser.Mymacs.PrintClass.Source';
- %include PrintClass;
- %PrintClass;
- 1 filename PrintClass Catalog 'Sasuser.Mymacs.PrintClass.Source';
- ERROR: Invalid logical name.
- ERROR: Error in the FILENAME statement.
- 2 %include PrintClass;
- WARNING: Physical file does not exist, C:\Users\bfd\printclass.sas.
- ERROR: Cannot open %INCLUDE file PRINTCLASS.
- 3 %PrintClass;
- -
- 180
- WARNING: Apparent invocation of macro PRINTCLASS not resolved.
- ERROR 180-322: Statement is not valid or it is used out of proper order.