Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

For “portable numeric” data?

Data
0
10 Posted

For “portable numeric” data?

0

“Standard” more or less numeric data types include USAGE BINARY and USAGE PACKED-DECIMAL. These were introduced in the ’85 Standard and provide for portable source code – but NOT NECESSARILY PORTABLE STORAGE. Taking the most simple example, 05 How-Many-Bytes Pic 9(04) Packed-Decimal. may be stored as either 2 or 3 “bytes” (a concept that isn’t in the current Standard – but will be in the next one) of storage – depending on whether your compiler “requires” a sign-nibble for even unsigned packed-decimal items. The general rule is that all “meaningful” digits of a packed-decimal item take 1 nibble (half of a byte) and the sign takes another. But when the data definition does NOT include a sign (S), then some systems still require the storage and some don’t; some store an unsigned numeric field with the same sign-nibble as a positive number and some don’t. (Most common examples – Most IBM-compatible PC’s treat positive and unsigned numeric fields with a X’3′ sign-nibble – while most IBM co

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123