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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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