|
-----Original Message-----[mailto:java400-l-bounces@xxxxxxxxxxxx]
From: java400-l-bounces@xxxxxxxxxxxx
On Behalf Of Wes Taylor
Sent: Thursday, February 19, 2009 6:44 AM
To: java400-l@xxxxxxxxxxxx
Subject: ProgramCall with double parm
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
this.
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!!!!
Thanks,
Wes Taylor
Senior Programmer/Analyst
Comporium Data Services
(803) 326-4115
wes.taylor@xxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
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.