Chris Bipes wrote:
The instructions say to put this in to a CL script:
#!/bin/sh
PATH="$PATH:/usr/bin/jre1.2.2/bin" (but I do not have any jreX.X.X
directory.)
Java -cp /usr/bin/bb/java/bbas400.jar:/usr/bin/bb/java/jt400.jar
com.shenmfg.AS400BBAgent /usr/bin/bb/java/server.properties &
A CL script?! This appears to be a Bourne shell script for a Unix
system! but, even in that environment,it wouldn't work, because you've
capitalized the J in Java, and Unix is case-sensitive...
But, anyway... setting PATH is unnecessary. In Qshell, the 'java'
command is in your PATH by default, and in CL you use *LIBL, not PATH.
The other part. In QShell it would be just like it is in Unix:
java -cp /usr/bin/bb/java/bbas400.jar:/usr/bin/bb/java/jt400.jar
com.shenmfg.AS400BBAgent /usr/bin/bb/java/server.properties &
You can run that from CL with the STRQSH command...
Alternately, you can use the JAVA CL command (Though, you may have to
run CRTJVAPGM first)
This is a one-time only command (if you even need it):
CRTJVAPGM CLASS('/usr/bin/bb/java/bbas400.jar') +
CLASSPATH('/usr/bin/bb/java/jt400.jar')
Then the part you'd put in your "CL script" would be this:
JAVA CLASS('com.shenmfg.AS400BBAgent') +
PARM('/usr/bin/bb/java/server.properties') +
CLASSPATH('/usr/bin/bb/java/bbas400.jar:/usr/bin/bb/java/jt400.jar')
Note that the -cp switch on the Unix (or QShell) java command is short
for 'classpath', so the data that follows it belongs in the CLASSPATH
parameter to the JAVA command (you put it in the CLASS parameter). The
next parameter to the Unix/QShell java command is the name of the Java
class you want to run (which goes in the CLASS parameter of the JAVA CL
command). Everything after that is a parameter to pass to the JAVA
class.... in your case there's only one parameter, which is
/usr/bin/bb/java/server.properties. The & at the end of the Unix
command line means "run in the background"... the closest equivalent in
CL would be the SBMJOB command.
So if you want the SBMJOB command (though, I suspect you'll actually run
your entire CL program in batch instead) would look like this:
SBMJOB CMD(JAVA CLASS('com.shenmfg.AS400BBAgent') +
PARM('/usr/bin/bb/java/server.properties') +
CLASSPATH('/usr/bin/bb/java/bbas400.jar:/usr/bin/bb/java/jt400.jar'))
Sorry if that CLASSPATH line gets misformatted... but everything from
the word CLASSPATH to the end of the command is intended to be on a
single line with no spaces in it.
As an Amazon Associate we earn from qualifying purchases.