Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

578 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