I have made a logfile reader in Java that is supposed to alert me via Xymon when more than 1 redis servers is down simultaneously.
Now I am supposed to feed the output to Xymon via a Rexx script and I tried to do that by calling the command to run the Java program using bpxwunix.
However, when I run the code to test it, it says: "sh: 1: BPXWUNIX not found".
I don't understand what I am doing wrong, I've been searching for a method to somehow include the bpxwunix function but it is my understanding that this is not necesarry.
I'm pretty sure the Rexx script is the problem because I tried a blank Java program that just prints a single line and got the same error. Also tried to just run the program in the command line with java -jar and it runs fine.
I am talking about Regina Rexx (even though it says oorexx and netrexx in the tags, I couldn't add a new rexx tag because my reputation was not high enough). And I am trying this on Ubuntu 18.04.
Anyone that can help me out? Please alert me if I missed any details! The rexx code is provided below:
/* rexx */
env.0=1
env.1="/usr/bin:.:/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin:."
stdin.0=0
reader="/home/slave2/Downloads/LogFileReader.jar"
cmd="java -jar reader"
call bpxwunix cmd,stdin.,stdout.,stderr.,env.
SAY "stdout:"
exit
IBM provides BPXWUNIX as a built-in command in the z/OS operating system. If you're not running there — and your mention of Regina Rexx implies that you're not — then the command won't be available.