BookmarkSubscribeRSS Feed
Patrick
Opal | Level 21
Hi all

I'm running the following script in a vmware Windows2003 image with PC
SAS 9.1.3 on a single intel processor laptop.
The script should "spawn" 3 sessions on the same machine where the main program runs.
The 3 sessions should run in parallel (asynchronous).


options sascmd='C:\Program Files\SAS\SAS 9.1\sas.exe -
nosyntaxcheck' ;


%macro testit;
%do i=1 %to 3;
signon t&i;
%syslput ri=&i;
rsubmit wait=no log="C:\temp\testNew2_&i..log" output="C:\temp
\testNew2_&i..lst" ;
filename test "C:\temp\testNew2_&ri..txt";
data _null_;
file test;
put "Test &ri";
call sleep(10,1);
run;
filename test clear;
endrsubmit;
signoff t&i;
%end;
%mend;


%testit


I have the following 2 questions/issues:


1. It looks to me as if the tasks run synchronous instead of
asynchronous - why?


2. If I run the code more than once I get the following error:
ERROR: File is in use, C:\temp\testNew2_1.log.
ERROR: Remote submit cancelled.


Why is the log file still locked after signing off from the "spawned"
session? What am I missing?


Cheers, Patrick
3 REPLIES 3
DanielSantos
Barite | Level 11
Hello Patrick.

Set the autosignon option at the beginning:

option autosignon=yes;

Cheers from Portugal.

Daniel Santos @ www.cgd.pt.
Patrick
Opal | Level 21
Hi Daniel

Thanks for your answer. Someone replied! 🙂

I tried autosignon=yes; but still encounter the same issues.

There is an explicit signon in the code I provided so I don't really understand the point of adding the autosignon option.

I could imagine that multithreading doesn't really work as there is only one processor - and even though it's a dual-core processor it could be that the VM ware image runs on only one core. Just theory - but it's at least some kind of explanation.... Running very similar code in a multi-processor Unix environment works fine and the tasks run in parallel.

I still don't understand why the files stay locked even after an explicit signoff.

Cheers, Patrick
DanielSantos
Barite | Level 11
autosignon must be set if you wish to use multithreading feature (MP Connect).

Something may be wrong with your setup.

MP Connect will run on a single CPU (although internally, it should clearly be round robin processing).

I have ran the exact same code (with the autosignon=yes) asynchronously on my workstation (WinXP P4 with single CPU) with no problem at all.

Could you try the following code, to see if it works on your installation:

http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/a001249955.htm

Cheers from Portugal.

Daniel Santos @ www.cgd.pt
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2352 views
  • 1 like
  • 2 in conversation