What is this SAS note saying? ODS PDF(WEB) printed no output - sas

What is this SAS note saying? ODS PDF(WEB) printed no output.
I have not requested the saving of a pdf file. This code is just at the beginning of my program code.
98 /* ODS STATEMENTS */
99 ODS LISTING GPATH='&sasworklocation';
100 ODS LISTING GPATH='c:\data';
101 ods path reset;
102 ods _ALL_ close;
NOTE: ODS PDF(WEB) printed no output.
(This sometimes results from failing to place a RUN statement before
the ODS PDF(WEB) CLOSE statement.)
ods trace off;
Thank you.
MM

If you're using SAS EG or Studio it submits some code at the beginning of each submission and teh end. You can turn the display of this code on/off but you cannot stop it. You likely have PDF selected as an output options somewhere or the automatic code is generating that message. You can probably ignore it safely.

To reduce log output in SAS University uncheck LOG Options-Show generated code in SAS log preferences.

Related

SAS ODS not to open output

In the following code, I would like to print an excel sheet and do not open it once the code ends, does anyone know how to do this because the ods excel close does not work. There is an option in the SAS 9.4 platform to not open the output but when I choose than and open a new SAS session the option is reverted. Anyone knows something about it? Thanks :)
ods listing close;
ods excel file="path.xlsx"
/*ods excel file="path.xlsx"*/
/* will apply an appearance style */
/*style=calibri*/
options(
/* for multiple procs/sheet */
sheet_interval="none"
/* name the sheet tab */
sheet_name="filename"
);
/* add some formatted text */
ods escapechar='~';
ods text="~S={font_size=14pt font_weight=bold}~filename";
proc print data=data noobs;
run;
ods excel close all;
ods listing;
Tazz:
Problem
You should look at the SAS log for ERROR messages. In future questions be sure to add ERROR messages. Do you get this message ? (### is the source code line number)
### ods excel close all;
---
22
202
ERROR 22-322: Syntax error, expecting one of the following: ;, ANCHOR, AUTHOR, BOX_SIZING,
CATEGORY, CLOSE, COMMENTS, CSSSTYLE, DOM, DPI, FILE, GFOOTNOTE, GTITLE, IMAGE_DPI,
KEYWORDS, NOGFOOTNOTE, NOGTITLE, OPTIONS, SASDATE, STATUS, STYLE, TEXT, TITLE,
WORK.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
So, this statement of yours is invalid
ods excel close all;
Fix
Use instead either
ods excel close;
or
ods _all_ close;
Be forewarned, the first time you run the code Excel will open the output. If you leave the results open in Excel and run the code again you will get a different ERROR:
ERROR: File is in use, ....
because the destination will still be open and SAS will not be able to write to it.
Turn off results viewing
ODS RESULTS OFF;
The ODS destination will be written to. The automatic viewing of results and results tracking as new items in the Results tab will not happen.
The setting is not programmed in, it's in the GUI.
Tools>Options>Preferences>Results
Uncheck: View results as they are generated

SAS suppress .lst files but keep ODS output

I was doing a PCA analysis with SAS using the following code:
ods output Eigenvectors=PRINCEEV Eigenvalues=PRINCEEVAL;
proc princomp data=REPLACED PLOTS=SCORE(ELLIPSE NCOMP=5) NOPRINT;
id time;
run;
ods output close;
Because the lst files this analysis produces is too large, I used the NOPRINT option. However, it seems that the NOPRINT option also eliminates all of my ODS outputs. (Now PRINCEEV and PRINCEEVAL are all empty):
ERROR: File WORK.PRINCEEVAL.DATA does not exist.
ERROR: Export unsuccessful. See SAS Log for details.
259 putn
_______
1
259 ! ame=YES; run;
WARNING 1-322: Assuming the symbol PUTNAMES was misspelled as putname.
ERROR: File WORK.PRINCEEV.DATA does not exist.
ERROR: Export unsuccessful. See SAS Log for details.
ERROR: Errors printed on page 1.
Is there a way to suppress the generation of lst file, without affecting the ods output?
UPDATE:
It seems that according to the following sas blog, it is not possible to do that:
Can you combine NOPRINT and ODS OUTPUT?
SAS programmers crave efficiency. Upon reading that the NOPRINT option
can make a procedure run faster, the ambitious programmer might
attempt to run a procedure with the NOPRINT option but use the ODS
OUTPUT statement to capture the results of one table. Sorry, friend,
but you can't do that. The NOPRINT option means that no ODS tables are
created, so there is no way to select a table and save it to a data
set.
But the dilemma is, I have limited space on the cloud computing server. The lst files are doing nothing but wasting my spaces. Deleting the lst files when SAS programs are running with external processes will also produce an io error in SAS (I already tried that).
Is there anyway around?
I would suggest:
ods listing close ;
ods output Eigenvectors=PRINCEEV Eigenvalues=PRINCEEVAL;
proc princomp data=REPLACED PLOTS=SCORE(ELLIPSE NCOMP=5) NOPRINT;
id time;
run;
ods output close;
This will close the listing destination, so should work fine.
I noticed in a related blog post, Rick argued for:
ods exclude _all_ ;
http://blogs.sas.com/content/iml/2015/05/28/five-reasons-ods-exclude.html
Minor change to the previous answer: remove the NOPRINT option and after the ODS OUTPUT is created open up the ods listing if you have further code.
ods listing close ;
ods output Eigenvectors=PRINCEEV Eigenvalues=PRINCEEVAL;
proc princomp data=REPLACED PLOTS=SCORE(ELLIPSE NCOMP=5) /*NOPRINT*/;
id time;
run;
ods output close;
ODS LISTING;
If you execute your sas-script on your cloud computing server via bash, then you can send your .lst files to /dev/null:
sas -print /dev/null script.sas
The -print option only effects your .lst, but not any ODS related outputs.

insufficient authorization to access external CSV files in sas studio

Here is the code.
data test;
infile '/folders/myfolders/smile.txt';
run;
ods csvall file='c:\test.cvs';
proc print data=WORK.ONE;
var Name Score Grade;
by IdNumber;
run;
ods csvall close;
The first data step runs well. The main issue is with the ods part. I got the insufficient authorization to access the csv file error in logs. Could anyone tell me why? Many thanks for your time and attention.
EDIT: So sorry for the mistake. For the second block of the code, that is actually this:
ods csvall file='/folders/myfolders/test.csv';
proc print data=WORK.ONE;
var Name Score Grade;
by IdNumber;
run;
ods csvall close;
To my knowledge, code you submit in SAS Studio is run on the server to which you're connected.
The first datastep reads from a (Unix) server path (forward slashes to delimit folders). The second block of code is trying to write out to a Windows drive (drive letter and backslash delimiters), but as the code is running on the Unix server, it knows nothing of your local (Windows) environment.

2 proc print output in the same page (listing or rtf)

I am running two proc print and would like to compare them visually on the SAS listing output. Both proc print prints only 3 observations.
The issue is I can't have the 2 output in one and same page...I have to scroll down for one page to another page to look at the other output. I have tried option pagesize=MAX but it doesn't work (MIN neither)...Is there a way to achieve what I want ?
I was wondering if an ODS statement redirecting to RTF or (PDF) would do that ?
Thanks in advance
sas_kappel
Both ODS destinations can give you this, using the startpage=never option, which tells SAS not to start a new page when a new procedure is run.
These output to a results window, rather than the listing output.
option obs=3;
ods pdf startpage=never;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
ods pdf close;
option obs=max;
For the listing destination, you can replace the pagebreak with another character (e.g. a space) by using the option: option formdlim=' ';.
Thanks Keith.
And would it be possible to have it directly in my output sas window ? I was thinking the ods statement ( as I only need the listing output) It doesn't seems to work:
option startpage=never obs=3;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
option obs=max;
So I guess there is no other option to achieving this other than ODS statement ?

Determine ODS settings

I am working inside a SAS macro application, and get the following warning before running a proc compare:
WARNING: No output destinations active.
Using the noprint option of proc compare does not suppress the warning. Am pretty sure the only way to get rid of this warning is to open an ODS destination (eg ods listing;) before running the proc, however I do not want to disrupt existing settings as there may be different ODS states at run time.
Is there any way to determine the ODS state programmatically? eg:
%let state=%sysfunc(getODSSTATE(listing)); /* for example */
ods listing;
proc compare base=x compare=y noprint; run;
ods listing &state; /* either %str(CLOSE) or %str() */
I had thought ODS SHOW; would be a solution, but that tracks the select/exclude, not the open destination.
One solution might be to choose a destination that is unlikely to be open - an obscure tagset perhaps - and open that to a dummy file, then close it. ODS PREFERENCES;also seems like a good compromise; it will open up whatever your default destination is, at least.
Honestly though, if you're writing a macro application, I would just leave the ODS alone; it should be up to the programmer using your macro to properly set up ODS ahead of time.