DATA Step, Macro, Functions and more

Problem using MP CONNECT piping facility in UNIX

Reply
Occasional Contributor
Posts: 12

Problem using MP CONNECT piping facility in UNIX

I’m trying to use the MP CONNECT piping facillity that uses ports rather than disk devices por I/O. I have this code:


rsubmit wait=no;

libname outLib sasesock "Smiley Tongueipe1";

/* create data set - and write to pipe */
data outLib.Intermediate;
do i=1 to 5;
put 'Writing row ' i;
output;
end;
run;
endrsubmit;

/* ----------- DATA Step - Process P2 ----- */
rsubmit wait=no;

libname inLib sasesock "Smiley Tongueipe1";
libname outLib "/tmp/";

data outLib.Final;
set inLib.Intermediate;
do j=1 to 5;
put 'Adding data ' j;
n2 = j*2;
output;
end;
run;

endrsubmit;

when I execute the first rsubmit I find the following error:
828 libname outLib sasesock "Smiley Tongueipe1";
ERROR: Unknown service name, pipe1, please check your TCP/IP services file
ERROR: Error in the LIBNAME statement.

I suppose that pipe1 is the name of a service that must be running in some port in the UNIX server, isn’t it??.
I don’t know how to start this service and what I have to do in UNIX to run this SAS program. In wich port??, what kind of service??

Any advice will be greatly appreciated, I’m a beginner using this pipe facility.
N/A
Posts: 0

Re: Problem using MP CONNECT piping facility in UNIX

you got to register a port # as pipe1 in /etc/services
http://support.sas.com/documentation/cdl/en/camref/59596/HTML/default/configserv.htm
Occasional Contributor
Posts: 12

Re: Problem using MP CONNECT piping facility in UNIX

Posted in reply to deleted_user
Thank you for your help. I will register in the services file as you say, but I have another doubt, pipe1 is a services defined in one port, then I suppose pipe1 is a server appliction listening in this port, waht kind of app is pipe1??.
I don't know much about ports and services in UNIX, but I know that, for example, "telnet" is ans app server listening in one port for clients requests, what kind of server app is "pipe1"??, do I need some instalation??, does it works like the UNIX pipe command ( cat file | grep "character" | sort ...).

Any advice will be greatly appreciatted, because I know SAS, but not much UNIX...
N/A
Posts: 0

Re: Problem using MP CONNECT piping facility in UNIX

Occasional Contributor
Posts: 12

Re: Problem using MP CONNECT piping facility in UNIX

Posted in reply to deleted_user
Thank you for your help, urchin.

I have problemas identifying the SAS spawner.
That's what I have in the sasroot/utilities/bin directory
>ls
bdm cfgpeh cleanwork elsconf elssrv
jproxy ke2j ke2s kj2e ks2e
motifxsassm objspawn patchname rbrowser reshelper
sasauth sasmailer sasm.elm.mime sasperm sastcpd
sasumgmt saswujms setuid

How can I identify the spawner??

Another question, I suppose that this program must be definded in the etc/services UNIX file, also is correct???

And the program must be running in UNIX. It cab be located with this:

ps -ef | grep "spawner-name"

As you can see, I'm not an expert....

Any advice will be greatly apreciatted, I don't know much about UNIX services and how it works...
N/A
Posts: 0

Re: Problem using MP CONNECT piping facility in UNIX

(1) sastcpd is the Unix spawner program.
(2) you don't have to register a service entry in /etc/service.

I can give you an easy example.
Open two terminals in Unix, and
(1) type /usr/local/SAS_9.1.3/SAS_9.1/utilities/bin/sastcpd -service 5050 -sascmd '/usr/local/SAS_9.1.3/SAS_9.1/sas -dmr -noterminal -nosyntaxcheck -device grlink' in terminal 1. The actual paths could be different in your system.
(2) In terminal 2, use any editor to enter the following code and save as test.sas
/*
%let node = 127.0.0.1 5050;
options comamid=tcp;

filename rlink '/usr/local/SAS_9.1.3/SAS_9.1/misc/connect/tcpunix.scr';
*actual path to tcpunix.scr may vary;
signon remote=node user=$youruserid$ password=_prompt_;
*replace $youruserid$ with your actual userid;
rsubmit node;
proc print data=sashelp.class;
run;
endrsubmit;
signoff node;
*/
After the above code is saved, type command sas -nodms test and after a few seconds you should be prompted for the password. If successful, there should be a test.lst file created.

Because I'm not the root user of our Unix server, I cannot really test any fancy setups and cannot help you any further. Two more references,
http://support.sas.com/documentation/cdl/en/camref/59596/HTML/default/a000173245.htm
http://support.sas.com/documentation/cdl/en/secref/59964/HTML/default/a003047680.htm
Occasional Contributor
Posts: 12

Re: Problem using MP CONNECT piping facility in UNIX

Posted in reply to deleted_user
Thank you very much for your help urchin. It's being very productive.

I 'll talk with the UNIX admin, because I don't have root permission to start sastcpd service.
If you have time I have another question, I don't understand know how MP connect pipeline works.
In the libname you specifie a reference to a TCP/IP pipe instead of to a physical disk device, then the intermediate data is not write in a disk device??, is correct??.
I understand that you save time in I/O, but where is the intermediate data??, in memory?, in RAM???

I would like to undestand the phisical running of MP connect pipeline.

Thank in advance,
N/A
Posts: 0

Re: Problem using MP CONNECT piping facility in UNIX

I guess SASESOCK is just some sort of cache with limited size. I don't know where it is because it's not mentioned anywhere in the SAS/Connect reference.
Just search 'SASESOCK at support.sas.com, and you'll find only a limited number of references so you should be able to read them all.
Ask a Question
Discussion stats
  • 7 replies
  • 348 views
  • 0 likes
  • 2 in conversation