Search code examples
sasremote-serverwrds

SAS auto log clear with rsubmit


I used to add dm "out;clear;log;clear;"; to clear the log and prevent the code from pausing for input. However, now I am using WRDS remote connection. This line after rsubmit does not work and the I lost connection to the server because I was not by the computer when the log was full and needed for user input to be cleared. Is there a way to prevent the code from stopping? Here is what I am doing now.

options ls = 78 ps = 66;

********************connect to WRDs;***************************************;
%let wrds = wrds.utexas.edu 4016;options comamid = TCP remote=WRDS;
signon username=_prompt_;
*************************************************************************;

rsubmit;
libname qa"F:\research2\transcripts";
libname cq '/wrds/nyse/sasdata/taqms/cq';


proc upload data=qa.daylist out=daylist; run;
data daylist;set daylist;traday2 = input(put(traday,yymmddn8.),8.);drop traday;rename traday2=traday;run;
options errors=2;

data intraday;run;
%macro temp;
%do i = 1 %to 2215; 
.......
dm "out;clear;log;clear;";
%end;
%mend;
%Temp;

Solution

  • One option (which avoids the need to clear the log) is to write the log to an external destination using proc printto (doc link). The syntax is:

    proc printto log='/path/to/your.log';
    run;