| 
 | 
First off I want to let you know that I am just starting to
play around with java on the iSeries 
so please forgive my ignorance on this one
 
I do not want to say how much time I have spent trying to
change a CL program 
from using RUNJVA to using QSH to run it.
It seems to me it should be very easy, but I have spent a
lot of time trying different formats and reading and re-read
midrange archives trying to find the correct format. 
With my current example I am getting error:
qsh: 001-0050 Syntax error on line 1: token "(" not
expected. 
 
Here is what works
DCL        VAR(&inFileFlg) TYPE(*CHAR) LEN(20) +    
              VALUE('-inputfile')                    
DCL        VAR(&outFileFlg) TYPE(*CHAR) LEN(20) +   
              VALUE('-outputfile')                   
CHGVAR     VAR(&fulPathIn) VALUE('/drjc/java/testin.txt')
CHGVAR     VAR(&fulPathOut) VALUE('/drjc/java/testout.txt')
                                   
CHGVAR &classPath
('/QIBM/ProdData/OS400/jt400/lib/jt400Native.jar:+ 
 
/drjc/java/commons.jar:/drjc/java:/drjc/java/convertf.jar:.'
)                  
 
** The following works **
RUNJVA     CLASS('convert') PARM(&inFileFlg  &fulPathIn    +
             &outFileFlg   &fulPathOut)
CLASSPATH(&classPath)        
 
** The following does not work **
CHGVAR     VAR(&CMD) VALUE('RUNJVA CLASS(convert) +      
             PARM(' *TCAT  +                              
             &inFileFlg  *BCAT &fulPathIn  *BCAT +        
             &outFileFlg *BCAT &fulPathOut *BCAT +        
')' *BCAT 'CLASSPATH(' *TCAT &classPath *TCAT ')' )  
                
STRQSH     CMD(&CMD)
** This causes error:
qsh: 001-0050 Syntax error on line 1: token "(" not
expected. 
Press ENTER to end terminal session.
 
Can anyone give me the correct format for &CMD?
 
Thanks 
John
 
 
 
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.