× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,
I cannot help you, but if I good remember, the last halfbyte of packed field is 
different from S/36 and AS/400,
and this may cause the error that you see...

Ciao.

On Wed, 14 Nov 2001 09:01:03 -0500, AAnuszewski@hammer.net wrote:

>
>
>
>I am currently working on a project where I am required to access legacy files
>within the system/36 of our AS400.  The data fields in these files are not
>externally defined, and I cannot change the files in any way.
>
>Using jtopen 2.05, I am able to access character data with no problem.  I
>defined the data fields within my java program, and have verified that I am 
>able
>to read the data.
>
>The problem is with packed decimal fields.  When I try to read a packed decimal
>field and convert it to a Big Decimal, the java program throws an exception.
>
>
>
>java.lang.NumberFormatException: 52
>at com.ibm.as400.access.AS400PackedDecimal.toObject(AS400PackedDecimal.j
>ava:481)
>at com.ibm.as400.access.Record.getField(Record.java:586)
>at com.ibm.as400.access.Record.getField(Record.java:612)
>at ListRecords.<init>(ListRecords.java:68)
>at ListRecords.main(ListRecords.java:90)
>
>
>I have been fighting with this for several days, and am desperate for a
>solution.
>
>
>The data itself is basically one long string in a flat text file.  However, I
>have tried reading the fields as a string, and the program still blows up.
>
>
>Can anybody offer assistance with this problem?
>
>
>Thank you,
>Amy Anuszewski
>Weidenhammer Systems Corporation
>
>
>_______________________________________________
>This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
>mailing list
>To post a message email: JAVA400-L@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
>or email: JAVA400-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/java400-l.
>
>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Franco Biaggi">
<meta name="GENERATOR" content="Franco Biaggi">
</head>

<body>

<p>&nbsp; </p>

<table BORDER="1" COLS="1" WIDTH="452" BGCOLOR="#FFFF00">
  <tr>
    <td width="446"><font face="Comic Sans MS"><small><small><br>
    <font color="#3333FF"><a href="http://www.ticino.com/usr/fbiaggi/">Franco 
Biaggi</a></font><small><br>
    <font color="#3333FF"><a href="http://www.sisa.ch">SISA Studio Informatica 
SA</a></font><small><small><small> <br>
    </small></small></small><font color="#3333FF">R&amp;D 
Services</font><small><small><small>
    <br>
    </small></small></small><font color="#3333FF">Via Carvina 
1</font><small><small><small> <br>
    </small></small></small><font color="#3333FF">CH-6807 
Taverne</font><small><small><small> <br>
    </small></small></small><font color="#3333FF">Efax +1 801 705 
2839</font></small></small></small><br>
    </small></small></small><font color="#3333FF">Tel. +41 91 935 75 35&nbsp; 
Fax. +41 91 935
    75 30</font></small></small></small><br>
    </small></small></small><font color="#3333FF">Sorry for my bad 
english...</font><small><small><small> <br>
</font></td>
  </tr>
</table>
</body>
</html>





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.