I'm trying to use the ProgramCall class to call a CL program with one parameter 
8 characters long. I have this code (based on the example in the Toolbox for 
Java Redbook):
 
        ProgramParameter[] parameterList = new ProgramParameter[1];
        AS400Text text = new AS400Text(8, systemName); 
        byte[] statusFormat = text.toBytes("SSTS0200"); 
        parameterList[0] = new ProgramParameter( statusFormat );
 
It throws an exception when executing the line:
 
       byte[] statusFormat = text.toBytes("SSTS0200"); 
 
I get this error:
 
com.ibm.as400.access.ExtendedIllegalArgumentException: encoding (arcticsystem): 
Parameter value is not valid.
 at com.ibm.as400.access.AS400Text.setTable(AS400Text.java:260)
 at com.ibm.as400.access.AS400Text.getCcsid(AS400Text.java:189)
 at com.ibm.as400.access.AS400Text.toBytes(AS400Text.java:334)
 at com.ibm.as400.access.AS400Text.toBytes(AS400Text.java:310)
 at DotCallPcmiler.callProgram(DotCallPcmiler.java:120)
 at DotCallPcmiler.main(DotCallPcmiler.java:184)
 
Why is it not accepting the parameter as valid?
 
Thanks in advance for any help.
Kelly

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.