SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
skg74_mail_umkc_edu
Obsidian | Level 7

Hi, 

 

I would like to know, is there any data _null_ sas code to convert rtf file to pdf in SAS EG in linux environment.

 

Thanks in advance.

6 REPLIES 6
Reeza
Super User

Is SAS generating the RTF file?

 

EG doesn't usually allow you to pass commands to the OS, so do you have X commands enabled? 

skg74_mail_umkc_edu
Obsidian | Level 7

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?

Reeza
Super User

If the RTF file is generated from SAS, why not switch on PDF output as well instead of converting?

 

XCMD means it's enabled.

NOXCMD means its not enabled.

 

proc options; run;

If you haven't changed it, it's off by default. Only your system administrator will be able to turn it on, you can't control that option.

Kurt_Bremser
Super User

@skg74_mail_umkc_edu wrote:

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?


If the RTF is created from SAS, then just change ODS RTF to ODS PDF.

ballardw
Super User

@Kurt_Bremser wrote:

@skg74_mail_umkc_edu wrote:

Hi Reeza,

 

Yes,RTF file is getting generated.how can we know, whether x commands is enabled?


If the RTF is created from SAS, then just change ODS RTF to ODS PDF.


Of if you want both versions use two ods statements:

 

ods pdf file="filename.pdf";

od rtf file="filename.rtf";

<output generation goes here>

ods rtf close;

ods pdf close;

RW9
Diamond | Level 26 RW9
Diamond | Level 26

One other option you have, Adobe when installed, can have a folder which it routinely scans for files and converts anything it finds in there.  You could save your RTF there and it would pick it up and create the PDF.  However be aware that your limited in the fact you can't do anything mcuh with that process unless you know all the workings of Adobe.  

If your doing a large document and need bookmarks or anything fancy, then you may be better off looking at Word scripting (VBA) to load RTF files and create the document as you want.  In SAS you may not have command line access, and so far I have found the proc document and such like to be well below par in terms of usability.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2153 views
  • 0 likes
  • 5 in conversation