Hi,
Just a word first. You should be very explicit about platform specific
issues. As you can see from your previous login question ( regarding an
AS/400 ToolBox for Java issue ) and this one, if I understand it correctly,
people get confused here because they expect to answer it in a platform
independent way. This wastes their time and doesn't help you.
As I understand it, you are getting data from an AS/400 file that the
DDS shows as 'A' ( Alphameric ) and 'S' ( Signed, Zoned. ) Zoned fields
should easily go from a numeric format to a text ( or maybe we should say
alphameric here ) format, but as you should be aware, non-IFS files are in
EBCDIC on the 400. So, my expectation is that you are getting what looks
like junk in all the fields ( Java likes UniCode, mostly in ASCII ) and it
is not likely that the values in the zoned field would pass parseInt() or
anything like that. The best thing to do would be to use JDBC ( in which
case previous answers WOULD work ) or to do your own EBCDIC to ASCII
translation in the string, then parse it.
Joe Sam Shirah
Autumn Software
-----Original Message-----
From: Jeetandra Mahtani <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, April 15, 1999 12:56 PM
Subject: Urgent: Need to get int value
>Hello,
>This probably is a really simple question but I can't
>seem to get it working.
>I have retrieved a field from a from by the following:
>..
>String c1idat = req.getParameterValues("C1IDAT")[0];
>..
>Now, I need to get the int value of this string.
>The field in the table is of type S ( db2/400 ).
>The parameters are as :
>String parameters = c1cono + ",'" + c1coco + "','" +
>c1colo + "','" + c1qsit + "','" + c1qusr + "','" +
>c1emfq + "','" + c1susr + "','" + c1emfs + "','" +
>c1pusr + "','" + c1emfr + "','" + c1cusr + "','" +
>c1emfc + "','" + c1ema1 + "','" + c1ema2 + "'," +
>c1idat;
>All the other fields are of type A and only c1idat is
>of type S.
>I am pretty sure that if I can get the int value of
>c1idat, I should be able to add it.
>Any suggestions?
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html