这个SAS笔记在说什么?ODS PDF没有生成任何输出。

huangapple go评论54阅读模式
英文:

What is this SAS note saying? ODS PDF printed no output

问题

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.

英文:

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

答案1

得分: 1

这意味着你打开了它,然后在写入任何内容之前将其关闭。

如果你想要写点东西,然后运行一些 PROC 或 DATA 步骤以生成输出,然后再关闭它。

示例:

ods pdf file='myfile.pdf';
proc print data=sashelp.class;
run;
ods pdf close;

英文:

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;

答案2

得分: 1

TITLE 需要与 PROC 关联运行,它本身不能在没有 proc 的情况下将文本写入 PDF,您可以使用 PROC ODSTEXT 代替。这个 TITLE 语句的行为在您使用 SAS 一段时间后才会变得清晰。

NOTE 告诉您它正在生成一个空文件。

英文:

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;

huangapple
  • 本文由 发表于 2023年5月30日 00:19:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358874.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定