I'm trying to limit the number of observations included in ODS output table. My attempt is pretty basic:
OPTIONS NODATE number pageno=1 rightmargin=0.25in leftmargin=0.25in topmargin=0.4in bottommargin=0.4in;
options sysprintfont=("SAS Monospace" normal regular 8 ALL) orientation=landscape;
ODS LISTING CLOSE;
ODS NORESULTS;
ods TAGSETS.EXCELXP PATH="C:\TEMP" FILE= "&Place._RequiredFlaggedRecords.XML" STYLE=NORMALPRINTER;
/*Sets number of observations allowed per ODS*/
%let obs=100;
ODS TAGSETS.EXCELXP OPTIONS (EMBEDDED_TITLES='YES' EMBEDDED_FOOTNOTES='YES' SHEET_NAME='Outdated');
proc print data=&Place (obs=&obs) (rename = (CREATE_DATE = DATE_PROCESSED EARLIEST_DATE_TIME=VISIT_DATE_TIME EARLIEST_DATE=VISIT_DATE)) noobs;
var
DATEDIFF
DATE_PROCESSED
VISIT_DATE
VISIT_DATE_TIME
;
WHERE DATEDIFF >=60 ;
title1 j=l "Outdated Records " ;
title2 j=l 'This page reflects the records which were received more than 60 days following';
RUN;
Log file returns:
NOTE: Line generated by the macro variable "OBS".
1 100
---
22
76
ERROR 22-322: Expecting a quoted string.
ERROR 76-322: Syntax error, statement will be ignored.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.09 seconds
cpu time 0.01 seconds
Attempted using %eval
to make 100 numeric instead of character. Also replaced &obs with 100 instead of using macro. Both had same results as above.
Any help would be appreciated!