|
Mark Lazarus wrote: >Buck said: >>I work with telephone switch data. Because the switch needs to store many >>millions of call records, the switch stores many attributes as single bits >>to save space. Extracting these status bits was not pleasant in RPG III... Mark wondered: > RPG has several bit twiddling operations. What couldn't you handle? It isn't really a matter of "can't handle" . Obviously we got it done - we can read these call records :-) If you want a mild challenge, decode these fields from a two byte string: bits 16-08 Call start date value bits 07-04 Answer type value bit 03 Time change flag bit 02 Operator Assistance flag bit 01 International call flag Bit 16 is the most significant (leftmost) bit. The value fields are used as actual numbers, while the flag fields are indicators. For a real challenge, compile your code in S/36 mode, like the original code had to. Oh yeah, the field layouts change with each switch upgrade. Ease of coding and run time performance have both improved significantly by rewriting this in RPG IV. Buck Calabro Aptis; Albany, NY "Nothing is so firmly believed as that which we least know" -- Michel Montaigne Visit the Midrange archives at http://www.midrange.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.