How to call a UNIX shell script from PB7 client? Some DBs allow system call from stored procs, but I need general solution.

I would like to find a native PB7 DB-independent solution to execute a UNIX shell script from PB client. Some DBs allow system calls from within stored procedure (Informix is one of them), but I need a solution that doesn't rely on individual DB implementation.
lvovkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

buasuwanCommented:
you need a telnet client to logon to UNIX and send command to execute your shell scripts.

here are links to source code,tools for telnet clients

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://www.hallogram.com/telnettool/

and here from EE.
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_11662438.html

if you can wait I will take a time to develop telnet client to work with PowerBuilder for you.
0
lvovkAuthor Commented:
I work for a major investment bank where the NT environment is very tightly controlled. I cannot install any software without proper authorization. So using third-party telnet client will not do.

I could set up a port on UNIX in /etc/services, add a line to /etc/inet/inetd.conf to run a script when a telnet connection is made on a defined port, but I was hoping for a solution where I wouldn't have to go outside the confines of PowerBuilder and native NT services.
0
buasuwanCommented:
about telnet client solution, you can use WinSock API to develop this telnet client with PB(yes, NT has winsock DLL in the system).

this model will be looked like this.

             telnet protocol
PB+winsock DLL <-------> UNIX shell script


Oh, I have more idea.
If you have a Web Server runs on UNIX.
here is another solution,

you can use Powerbuilder function PostURL() or GetURL() to run shell script through PERL CGI or PHP script.

this model will be
        http protocol
PB <--------PERL CGI or PHP ------> UNIX shell script

simple code, in PB7

GetURL("http://server/scripts/run.cgi", ii_returnobject)

you need to write simple run.cgi to execute shell scripts and return your message back to PB.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.