Re: Invoking SAS from non SAS environment! #3


If performance is an issue then definitely go with a web service based
approach. Web services offer synchronous and asynchronous communication.
Since web services communicate over port 80, they are secure and they are as
fast as your internet connection. Using older stuff such as ftp and telnet
are going to be slower not to mention a lot more cumbersome.

Also, going down these older paths can work but it will be a hacked up
solution and may not be supported by the IT dept over time? Why? Open ports
outside of 80 are security issues. Hence, why web services are so important.
However, if it works for you and you are more comfortable with that path, go
for it.

Look at Powershell for automating telnet. Google Powershell telnet and you
will find a number of articles.


Alan Churchill
Savian "Bridging SAS and Microsoft Technologies"

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ankit
Sent: Monday, July 23, 2007 10:42 AM
Subject: Re: Invoking SAS from non SAS environment!

On Jul 19, 10:08 pm, michaelrait...@WESTAT.COM (Michael Raithel)
> Dear SAS-L-ers,
> Ankit posted the following:
> > I have a situation at hand and would like to know if anybody
> > has any suggestion. There is a oracle database on a windows
> > machine (say machine A) on which a trigger is written to
> > detect a change to a particular Oracle table. This trigger is
> > then expected to invoke a SAS program on another windows
> > server (say machine B). The SAS is installed only on machine
> > B and therefore cannot be executed directly from the machine A.
> > I was thinking of a approach where the trigger would invoke a
> > batch file on machine A. This batch file on machine A would
> > then invoke another batch file on machine B which would in
> > turn execute the SAS.exe to invoke the desired SAS program.
> > However, I am facing problem in invoking a batchfile on
> > another machine (machine B) from a batch file on another
> > machine (machine A).
> > Can anybody help?
> Ankit, it looks as if you are pretty close to a solution in your
> posting.  How about this:
> 1. The Oracle trigger executes and creates a batch file on machine A.
> It then FTP's the batch file to a special directory on machine B.
> 2. A SAS job is scheduled to run every 15 minutes on machine B.
> 3. The SAS job on machine B checks for the file in the special
> directory.  If it does not find it, it stops running.  If it does find
> the file, it does its thing and then deletes the file from the special
> directory.
> You could soup this up by perusing the date time of the file that is
> FTP-ed and add more intelligence to the scheduled SAS job.  You could
> change things up and have the SAS job check for the existence of the
> file on machine A.  Or, it could FTP the file to machine B--a Get; not a
> Put.  Whatever the case; I think that you may already have the basic
> backbone of the resolution to your problem in place.
> Ankit, best of luck getting your asynchronous processes in sync!
> I hope that this suggestion proves helpful now, and in the future!
> Of course, all of these opinions and insights are my own, and do not
> reflect those of my organization or my associates. All SAS code and/or
> methodologies specified in this posting are for illustrative purposes
> only and no warranty is stated or implied as to their accuracy or
> applicability. People deciding to use information in this posting do so
> at their own risk.
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Michael A. Raithel
> "The man who wrote the book on performance"
> E-mail: MichaelRait...@westat.com
> Author: Tuning SAS Applications in the MVS Environment
> Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
> Second
> Author: The Complete Guide to SAS
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> If all economists were laid end to end, they would not reach a
> conclusion. - George Bernard Shaw
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- Hide quoted
text -
> - Show quoted text -

Thanks Alan and Michael. The problem is that I am trying to achieve a
near real time synchronization and therefore performance is an issue.
Therfore, I am not inclined towards bringing another technology (like
Java etc) into picture. For the same reason, I am not inclined towards
FTP a file and causing the scheduled ETL job to keep looking for the
file in order to execute a SAS code.

I did try TELNET and this enabled me to enter into the environment of
the target machine where I could execute my SAS code. However, this is
working in interactive mode. I am being unable to execute it in batch
mode as the TELNET (when submitted with target server ip, user id and
password) prompts for a user input stating "you are sharing your user
id and password over the internet zone. Do you wish to continue?" . A
message of something of this sort comes up. This requires the user to
input a value of "Y". Is there anyway I can suppress this message and
cause the TELNET command to work in batch mode without any user
intervention? The servers are all on windows.

savian001 (795)
7/23/2007 5:01:41 PM
comp.soft-sys.sas 140399 articles. 1 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 28