|
Ron wondered: >Can you give me a source for the 'B' type being deprecated. >We do need to >fix some programs and I could use some ammunition for getting >the time to >implement changes. I don't think there's an official "deprecation" list for RPG (although stacker select doesn't seem to work anymore...) but "binary" as a data type is a Bad Idea because of the way RPG implements binary (B) numbers. The RPG IV Reference V5R1, page 181: "Processing of a Program-Described Binary Input Field Every input field read in binary format is assigned a field length (number of digits) by the compiler. A length of 4 is assigned to a 2-byte binary field; a length of 9 is assigned to a 4-byte binary field, if the field is not defined elsewhere in the program. Because of these length restrictions, the highest decimal value that can be assigned to a 2-byte binary field is 9999 and the highest decimal value that can be assigned to a 4-byte binary field is 999 999 999. In general, a binary field of n digits can have a maximum value of n 9s. This discussion assumes zero decimal positions." This means that you can't use the full (integer) size of the field - big binary numbers get truncated. --buck
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.