× 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.



I may have misunderstood what you were asking, but I know that the MONMSG method works perfectly if you want to prevent any stoppage after the Java call has completed. We have several Java applications being called from a CL program that are running in batch.
The syntax in the CL program is as follows:

JAVA CLASS(com.mycompany...) PARM(&MYVAR) PROP((java.version 1.4))
MONMSG MSGID(JVA0122)

Thanks,
Todd


At 04:19 PM 8/30/2005, you wrote:
Thanks for the responses.

Setting the QIBM_QSH_CMD_OUTPUT variable and calling calling QSH directly
instead of calling JAVA directly worked great.  Because I needed to do
processing based on the JAVA exit status, I also added the
QIBM_QSH_CMD_ESCAPE_MSG='Y' environment variable.  Now, I think the
behaviour is exactly what I want.  I also added the necessary code to save
and restore the environment variables I change in my CL program just in
case the user had them setting.

The other methods suggested don't seem to work.  I tried several variations
of MONMSG but I don't think the message is actually returned to the calling
CL program until after the terminal session has ended.  I think the OVRDBF
of STDERR and STDOUT may work when calling from RPG but not in my case.




             Magne Kofoed
             <magne@xxxxxxxxx>
             Sent by:                                                   To
             java400-l-bounces         Java Programming on and around the
             @midrange.com             iSeries / AS400
                                       <java400-l@xxxxxxxxxxxx>
                                                                        cc
             08/30/2005 08:34
             AM                                                    Subject
                                       Re: OUTPUT parameter on JAVA
                                       command not valid in CL program
             Please respond to
             Java Programming
             on and around the
              iSeries / AS400
             <java400-l@midran
                  ge.com>






Hi,

I use QSHELL and add environment variable when I want to skip
the qshell output screen.

CHGCURDIR  DIR('/jar/score')
CHGVAR     VAR(&JAVA) VALUE('java +
           -Djava.version=1.4 -classpath +
             .:/QIBM/ProdData/Java400/jdk14/l+
             ib/IBMiSeriesJSSE.jar:jt400.jar:/qibm/prod+
             data/java400/jt400ntv.jar +
           RunAS400Score ' *BCAT &DQ +
           *BCAT &PNR *BCAT &TYPE)
ADDENVVAR  ENVVAR('QIBM_QSH_CMD_OUTPUT') VALUE('NONE')
MONMSG CPFA980
QSH        CMD(&JAVA)
RMVENVVAR  ENVVAR('QIBM_QSH_CMD_OUTPUT')
MONMSG CPF0000


Regards,
Magne


Date: Tue, 30 Aug 2005 09:05:51 -0400
From: Todd Allen <tballen@xxxxxxxxxx> Add To Address Book
Subject: Re: OUTPUT parameter on JAVA command not valid in CL
program
To: Java Programming on and around the iSeries / AS400
<java400-l@xxxxxxxxxxxx>


Monitor for message JVA0122 with a MONMSG command in your CL
program.


PierceJ@xxxxxxxxxxxxxxxx wrote:
> I am trying to call a Java program from a CL program.  I am
able to
> successfully call the Java program, but the shell doesn't
go away until the
> user hits enter.  I want the Java program to behave as if
called with the
> OUTPUT(* *CONTINUE) parameter on the JAVA call.  However,
when calling Java
> from CL, this parameter is not allowed.  I have
successfully redirected all
> my java i/o using the os400.stdout and os400.stderr
properties.  I would
> rather not have to submit my Java program to batch and then
wait in my CL
> program using some other means to avoid this behaviour.
>
> Any ideas?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.