|
Jon,
The problem is I won't always know where the data structure is coming from
and I don't want to have to hard code field names. Basically what is
happening is I have a program that is triggered off of multiple files. I
want to read the buffer in and extract the data using the QADBIFLD file in
a substring. The problem is the binary and packed fields are in hex
values. Therefore, I have to substring them out, put them in their native
form, and then move them to an alpha field to be encoded into an XML
message.
"Jon Paris"
<Jon.Paris@Partne To: <rpg400-l@midrange.com>
r400.com> cc:
Sent by: Subject: Data conversion -
Binary to Character
rpg400-l-admin@mi
drange.com
01/09/2002 04:18
PM
Please respond to
rpg400-l
>> I was wondering if anyone had an easy way to convert from numeric data
types to character types and back.
You've already got the "easy" answer - read the parm into the DS and
everything is automagic - why don't you want to do this? Anything else is
much harder and more error prone (and will in most cases require the use of
a DS anyway).
Jon Paris
Partner400
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.