DATA Step, Macro, Functions and more

Multi-threads statements log is not in sequence.

Reply
Occasional Contributor
Posts: 10

Multi-threads statements log is not in sequence.

I am facing a weird problem. 

 

I have sas program like that.

 

Proc printto log = "path" new;

run;

 

signon s1 server details;

 

rsubmit statements;

  Break input dataset of 20 millions records into 4 datasets in 4 threads. and addithional processing.

endrsubmit;

signoff ;

wait forall threeads;

 

data Final;

 set ds1 ds2 ds3 ds4;

run;

 

Program is executing fine without errors. But the logs are not in sequence as the statement executes.  Some part of thread 1 then thread 2 and thred 1 again like this.

 

Is there any option to arrange the log into the thread sequqnce. 

 

Please suggest. 

Super User
Posts: 3,105

Re: Multi-threads statements log is not in sequence.

What happens if you don't use PROC PRINTTO - same problem?

Occasional Contributor
Posts: 10

Re: Multi-threads statements log is not in sequence.

I need to use proc Printto only. Because same process runs for various scenarios parallely . So in that case by default log would overwritten. So i din check without Proc Printto.

Super User
Posts: 3,105

Re: Multi-threads statements log is not in sequence.

How are you running the job? My guess is you are running it interactively, say in EG or Display Manager. I suggest you run this in batch mode without PROC PRINTTO. Your log won't be overwritten in this case so it will be interesting to see what order the multiple RSUBMITs are in the SAS log file. I'm guessing they will be in the order that they are completed.

 

I also suggest experimenting with the LOG = option on the RSUBMIT statement:

 

http://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#p1eyablk3vvdlkn1h5...

 

This enables you to send each remote sessions' logs to different files if necessary. You could then assemble them together at the end in the order you want. 

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 102 views
  • 0 likes
  • 2 in conversation