Reputation: 59
I work on SAS Studio, and I try to make a pdf with ods. For an old job I managed to create the pdf without worries, but here it puts me that there is no output. Here it's my code, just to try to create the pdf.
ODS PDF file= '/home/u59673531/SASII/Rapport_F1.pdf'
Title= 'Rapport GP F1'
author='Mathéo FERRER';
OPTIONS NODATE NONUMBER;
ODS ESCAPECHAR='^';
ODS PDF STARTPAGE=NO;
TITLE "Bonjour";
RUN;
ODS PDF CLOSE;
And I can't find this pdf in my repertory. I have just this message
NOTE: ODS PDF printed no output.
(This sometimes results from failing to place a RUN statement before the ODS PDF CLOSE statement.)
Where does the problem come from ? What can I do? I saw other questions but it did not answer when we were on Sas Studio
Upvotes: 1
Views: 670
Reputation: 21274
TITLE needs to be associated with a PROC to run, it doesn't do anything on it's own to write text to the PDF without a proc, you can use PROC ODSTEXT instead. This behaviour of TITLE statements isn't really clear until you've used SAS for a while.
The NOTE is letting you know that it is producing an empty file.
ods pdf file='/home/fkhurshed/Sample1.pdf';
proc odstext;
p 'You can use the ODSTEXT procedure to add paragraphs
and lists to your output.';
p 'You can also format your text.' / style=[color=red fontsize=16pt];
p 'This slide shows data written to a PDF document.'
/ style=[color=CX6C8EAD fontsize=24pt];
run;
ods pdf close;
Upvotes: 1
Reputation: 51611
It means you opened it and then closed it before you wrote anything into it.
If you want to write something then run some PROC or DATA step that produces output before you close it.
Example:
ods pdf file='myfile.pdf';
proc print data=sashelp.class;
run;
ods pdf close;
Upvotes: 1