Can anybody tell me what is wrong with the following code?

I don't understand what is wrong with the following code,  I patched this
together from the JTOpen docs but it doesn't seem to work as I expected.
Below is the java code and the program dump from the rpg pgm.


             AS400DataType[] myStruct =
                new AS400Text(1, getSystem()),
                new AS400PackedDecimal(2, 0),
                new AS400Text(4, getSystem()),
                new AS400Text(4, getSystem()),
                new AS400Text(25, getSystem()),
                new AS400Text(1, getSystem()),

       AS400Structure myConverter = new AS400Structure(myStruct);

        Object[] myData =

        byte[] myAS400Data = myConverter.toBytes(myData);
        ProgramParameter[] pm = new ProgramParameter[1];
        pm[0] = new ProgramParameter(myAS400Data);


this is the info in the fields from a program dump

CO#                   PACKED(2,0)          NOT ADDRESSABLE
EOF                   CHAR(1)              NOT ADDRESSABLE
EQPCOD                CHAR(4)              NOT ADDRESSABLE
MDL#                  CHAR(25)             NOT ADDRESSABLE
MDL#COD               CHAR(4)              NOT ADDRESSABLE
SETLL                 CHAR(1)              '0'              'F0'X

only the first parm has valid data, the rest of the data structure has


Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot 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 here. If you have questions about this, please contact