Hello all,

We have the need to call a iSeries Cobol program via a Java class with a
parameter of type double. We are currently doing this but, the parms we
are passing in are Strings and we are using the texConverter to convert

We now have the need to call a Cobol program with a double parameter. I
am getting a length error. My double is 7 with 2 decimal places. It is
erroring out on the bold statment below.

I'm not sure where to put the length.

AS400DataType[] myStruct = {new AS400Text(7,
system.getCcsid(), system), new AS400Float8() };
AS400Structure myConverter = new AS400Structure(myStruct);
Object[] myData = { new Double(quantity1) };
byte[] myAS400Data = myConverter.toBytes(myData);
parmList[4] = new ProgramParameter(myAS400Data, 0);

Any help/suggestions would be greatly appreciated!!!!

Wes Taylor
Senior Programmer/Analyst
Comporium Data Services
(803) 326-4115

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.