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

Posted on 2003-03-25
Medium Priority
Last Modified: 2013-12-26
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.
Question by:lvovk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8212442
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


and here from EE.

if you can wait I will take a time to develop telnet client to work with PowerBuilder for you.

Author Comment

ID: 8212751
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.

Accepted Solution

buasuwan earned 750 total points
ID: 8219411
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.


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question