× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello,

Maybe I am approaching this from the wrong direction. I've been trying to call an As/400 program from tn5250. The program is nothing but a CL command that restarts our web server. What I am trying to do is I have a network monitoring system here that runs on my Linux box. When the monitor detects something wrong with the web server I can get it to call a shell script. This shell script then calls tn5250 to run my CL program on the As/400. When I execute the shell script from a shell this seems to work fine. I have tried running the shell script from the monitor program and as a cron job but they both seem to just ignore the tn5250 auto command. Is it just the fact that tn5250 will not run without an actual shell present?

Does anyone have any experience doing this kind of thing?
Is their another or better way to run an As/400 command from a Linux box?

Any help would be appreciated.

tn5250rc:

auto {
host = as400-2
+ruler
env.USER = DUMMY
env.IBMSUBSPW = DUMMY
env.IBMPROGRAM = RSTWEBB
env.IBMCURLIB = SCHUA
}

shell script
#!/bin/sh
service=$1
status=$2

if [ "$service" = "HTTP-ADS" ] ;
then
       if [ "$status" = "CRITICAL" ] ;
       then
               tn5250 auto
       fi
fi

--
Andy Schultz
http://www.grgeek.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.