Today just caught an undocumented SAS feature. I ran the following SAS codes to delete a dataset(in Windows 7 with SAS 9.3):
data a;
b=1;
run;proc datasets noprint;
delete a;
run;
quit;
and the dataset was deleted as I expected:
32 proc datasets noprint;
33 delete a;
34 run;NOTE: Deleting WORK.A (memtype=DATA).
35 quit;
But when tested in a SAS 9.2 machine, I got errors
25 proc datasets noprint;
——-
22
202
NOTE: Enter RUN; to continue or QUIT; to end the procedure.
ERROR 22-322: Syntax error, expecting one of the following: ;, ALTER, DD, DDNAME, DETAILS,
FORCE, GENNUM, KILL, LIB, LIBRARY, MEMTYPE, MT, MTYPE, NODETAILS, NOFS, NOLIST,
NOWARN, PROTECT, PW, READ.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
26 delete a;
27 run;NOTE: Statements not processed because of errors noted above.
27 ! quit;NOTE: The SAS System stopped processing this step because of errors.
Then I checked the SAS HelpDoc, there is no such “noprint” option in PROC DATASETS statement, but in CONTENTS statement in the PROC DATASETS PROCEDURE. Actually I added the “noprint” option just because I expected it act like the same option in PROC FREQ statement to suppresses output. And (un)fortunately, it worked in my machine…
UPDATE(2013-02-27): Just got feedback from a SAS developer this “noprint” will be documented in the upcoming SAS 9.4; actually it works like the existing “nolist” option.