[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: Read a TCP/IP pipe
From:       "Viel, Kevin" <kviel () SJHA ! ORG>
Date:       2011-05-27 14:38:04
Message-ID: 279E0CB25CBDEF4DB4A50E89328780E2074DB74AB1 () CHEXCMS08 ! one ! ads ! che ! org
[Download RAW message or body]

> On 5/26/11 11:26 AM, "Viel, Kevin" <kviel@SJHA.ORG> wrote:
> 
> > Greetings,
> > 
> > I see that SAS has a LIBNAME engine, SASECOCK, for reading from a
> > TCP/IP pipe.  It looks like one might have to license SAS/CONNECT or
> > SAS/SHARE.  Can anyone confirm this?
> > 
> > ERROR: The SASESOCK engine cannot be found.
> > 
> > Until I can demonstrate ability and cost benefit, I have little hope of
> > licensing an additional product.  I have had success using a pipe that
> > used perl to read a file.  Has anyone taken this approach?


This was one SAS program running on one SAS session running on my desktop.  It is the \
server listening for the client.

4    filename local socket ':5000' server reconn=3;
5       /*The server is using a reserved */
6       /*port number of 5000.           */
7
8    data tcpip;
9       infile local eov=v;
10      input x $10;
11      if v=1 then
12         do;              /* new connection when v=1 */
13            put 'new connection received';
14         end;
15      output;
16   run;

NOTE: TCP/IP XX Access Method Listen portno is 5000.
NOTE: The infile LOCAL is:
      Local Host Name=XXXX,
      Local Host IP addr=XXXX,
      Listen Portno=5000,Client Hostname,
      Client IP addr,Lrecl=256,Recfm=Variable

NOTE: TCP/IP XX Access Method has connected to client at IP addr XXXX .
NOTE: The infile LOCAL is:
      Local Host Name=XXXX,
      Local Host IP addr=XXXX,
      Listen Portno=5000,
      Client Hostname=XXXX,
      Client IP addr=XXXXLrecl=256,
      Recfm=Variable

NOTE: TCP/IP XX Access Method has connected to client at IP addr XXXX .
new connection received
new connection received
new connection received
new connection received
new connection received
NOTE: The infile LOCAL is:
      Local Host Name=XXXX,
      Local Host IP addr=XXXX,
      Listen Portno=5000,
      Client Hostname=XXXX,
      Client IP addr=XXXX,Lrecl=256,
      Recfm=Variable


This was the client.

1    filename remote socket 'XXXX:5000';
2
3    data _null_;
4       file remote;
5       do i=1 to 10;
6          put i;
7       end;
8    run;

NOTE: The file REMOTE is:
      Local Host Name=XXXX,
      Local Host IP addr=XXXX,
      Peer Hostname Name=N/A,
      Peer IP addr=XXXX,Peer Name=N/A,
      Peer Portno=5000,Lrecl=256,Recfm=Variable

NOTE: 10 records were written to the file REMOTE.
      The minimum record length was 1.
      The maximum record length was 2.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds


I submitted the client program several times.  I am curious to why "new connection \
received" was not printed to the log ten times?

Thanks,

Kevin
Confidentiality Notice:
This e-mail, including any attachments is the
property of Catholic Health East and is intended
for the sole use of the intended recipient(s).
It may contain information that is privileged and
confidential.  Any unauthorized review, use,
disclosure, or distribution is prohibited. If you are
not the intended recipient, please delete this message, and
reply to the sender regarding the error in a separate email.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic