Can I redirect the SAS listing desitination to the log?

Can I redirect the SAS Listing destination to the log?

Alternatively, can I redirect the Listing destination to an external file and keep it open in the SAS windowing environment? I know I can use PROC PRINTTO to write it out to an external file, but this prevents the output also appearing in the window.


Isn't it just a simple case of:

ods listing file="myfile.txt";

... and if you haven't already got ods html turned on:

ods html;

This will send the listing to the specified file instead of the 'Output' window, and the ODS results from any procs will go to your 'Results' window.

I know this setup has actually cause me issues in the path with creating and naming images as I didn't realise the listing destination was open in addition to my ODS destination and I was getting duplicated images until I turned listing off.

I've since discovered the -altprint option which does exactly what I want.

If you wish to change the output/lst dynamically during the course of a program to write to the log instead of a separate location then the following may be useful. (IE. this make both LOG and LST go to LOG)

It works in BATCH (NODMS) mode but will not work in interactive (DMS) mode.

I'm not sure how backwardly compatible this is, but it works in 9.4.

/* redirect OUTPUT/LST to LOG by going to the SASHELP VEXTFL to get the log fileref (ONLY WORKS IN BATCH)*/
%let ISBATCH=%sysfunc(getoption(dms));
%if &ISBATCH = NODMS %then %do;
    PROC SQL outobs=1 noprint; SELECT t1.fileref INTO :LOG_FILEREF FROM SASHELP.VEXTFL t1 where t1.xpath like '%.log%'; QUIT;
    proc printto print=&LOG_FILEREF; run;

Need Your Help

does a circle between tables in oracle violate any normalization?

oracle normalization

i Want to Know if i Have a Circle Between my Tables in Oracle,Does it Violate any Normalization? if it Does,Which Kind of Normalization This Violate?