On 12/06/2008, at 11:46 PM, Lim Hock-Chai wrote:

Not by choice. The engineer that created the application to store our
paging info has left the company. The engineer team has decided to no
longer support this application (Most of them are AIX programmers. They
are not interesting in getting into iseries). I happen to be the one
that got assign to take care of this application. My plan is to convert
it into RPG. However, this application stores data in iseries file in
bit format and as you know, RPG is not every good at that. A 4 bytes
field in the file might be divided into 6 different pieces of info where
the first bit might represent a flag, the next 3 bit might represent a
page type...

You can do this easily enough in RPG using the %BITxxx functions, the MI built-ins, or by writing a procedure to mask TESTB usage. Basic bit operations (set, test, mask) are fairly easy in RPG. It's only bit-shifting that's a bit harder (haha).

Otherwise you might consider changing the file from bit fields to a byte map. Much easier to handle in other languages.

Simon Coulter.
FlyByNight Software OS/400, i5/OS Technical Specialists

Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
ASCII Ribbon campaign against HTML E-Mail / \

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.