|
David Wall AS/400 Toolbox for Java "Craig Burton" <Craig.Burton@ccba To: <java400-l@midrange.com> i.com> cc: Sent by: Subject: RE: Java 400 - QSYRUSRI API call - *DTS DATE java400-l-admin@mi FIELDS drange.com 12/07/2001 10:20 AM Please respond to java400-l >> For the *DTS Date fields I was able to get working by defining as byte >> fields. I was unable to get working when defined in PCML as Character >> fields. The documentation defines as character, will I have a problem >> defining as bytes ??? The Toolbox program call object does not care how the field is defined on the server. All fields are bytes to Toolbox program call. It is up to the application to tell Toolbox how to interpret the bytes to make the app work. In the *DTS case, the app should tell Toolbox they are bytes even though the spec says they are characters. The good news is *DTS is a rare exception. In almost all cases fields defined a characters in the spec should be treated as characters. -----Original Message----- From: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com] On Behalf Of Dave Wall Sent: Thursday, December 06, 2001 6:19 PM To: java400-l@midrange.com Subject: Re: Java 400 - QSYRUSRI API call The character 8 field is the date in an iSeries date-time stamp (*DTS) format. The iSeries has an API to convert it from this format to a more industry-standard type format. Toolbox needed to do this conversion so often that we wrapped the API call in a class ... byte[] data = ...; // Some Char 8 *DTS date data from the system. DateTimeConverter conv = new DateTimeConverter(system_); // system_ is an AS400 object Date d = conv.convert(data, "*DTS"); If you use this class make sure you give it the raw bytes from the original API call. Don't convert them from EBCDIC to Unicode before giving them to DateTimeConverter. David Wall AS/400 Toolbox for Java "Craig Burton" <Craig.Burton@ccba To: <java400-l@midrange.com> i.com> cc: Sent by: Subject: Java 400 - QSYRUSRI API call java400-l-admin@mi drange.com 12/06/2001 10:32 AM Please respond to java400-l This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] When calling QSYRUSRI in Java (format USRI0300) how are the dates (specifically Password Change Date) retrieved. One example has this field defined as Character 8, another example has as Byte 8. When I use the metho getValue to a field of type Object, the field is displayed as barbled. Does anyone have an example of retrieving USRI0300 utilizing Java ???? Craig Burton CCB Associates Inc. Lawrence, Ma. (9768) 837-4403 x22 -- _______________________________________________ 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. _______________________________________________ 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. _______________________________________________ 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.
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.