Hello,
In a prgm I use ODS RTF and proc plot to get a graph into a file. In SAS guide It works correctly.
But whenever I launch the prgm via batch mode, then the file is empty and in the log file a message is "Device was not specified".
In the support.sas I found this "The only exception for batch processing is having output sent to the output window."
So how can I get my graph via batch mode into the output window ?
thanks in advance for your help.
Nasser
I forgot to specify that you should do
style = journal
to avoid an empty file
I'm not sure I follow your question. You can certainly use ODS destination statements in batch mode to route results to files.
ods rtf file='C:\c.rtf' style=sapphire;
proc print data=sashelp.class;
ods rtf close;
The look at the results in Word.
PROC PLOT? Seriously? SGPLOT is base SAS and is much more modern.
You need to make sure that your batch configuration matches your Workspace Server configuration and the EG code in terms of graphic options. When you look closely at the code submitted by EG, you'll find some options that are always set by EG before your code is run.
(eg
9 OPTIONS DEV=ACTIVEX; 10 GOPTIONS XPIXELS=0 YPIXELS=0;
)
thanks warren.
this is my code bellow. The rtf file is created but empty.I did not specified any device like
goptions ftext=zapf device=gif for example, wich device should I specify ? thanks
ODS RTF startpage = yes FILE = 'S:\Etudes Rentabilités\Rentabilité 2017\Encours Payback\NASSER\SASLOG\chroniques.rtf' style = sapphire ;
proc gplot data = BEH_SUITE_INDIC ;
format ratio percent7.0 ;
plot ratio * ANNEE_AMO_SUITE = &v_AXE. /
legend = legend1
vaxis = axis1
haxis = axis2 ;
run ;
ODS RTF CLOSE ;
I wonder wich device because I can notice "ERROR: Device was not specified" in the file log
It works ! I get a rtf file no empty, with a graph
By specifying device = png300 like this.
goptions reset = goptions device = png300 xmax=7in ymax=9in;
but I didn't manage to store the output file on windows in C:\... but only in SAS guide in a folder.maybe a FTP should be done
If your SAS runs on a remote server (which I presume), then you can't directly access your C:\ drive from the SAS code.
But you will find a task in EG that can transfer any file to/from the server. This can be used to download the newly created rtf to your PC.
Look in the Data menu in EG.
I forgot to specify that you should do
style = journal
to avoid an empty file
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.