Curious -- I just got notification of this post two hours ago.
I was using:
Dcl TempDec102 Dec (10,2);
Dcl TempDec73 Dec (7,3);
...
Put Skip Edit (TempDec102) (B);
Put Skip Edit (TempDec73 ) (B);
A co-worker pointed out the following:
The documented conversion rules for PL/I in the language reference section "Converting other data attributes" use a factor of 3.32 binary digits per decimal digit, rounded up to the next digit. The first case has 8 decimal digits before the point, giving 8*3.32 = 26.56 which rounds up to 27. The second case has 4 decimal digits, giving 13.28 which rounds up to 14.
That explains the behavior. I had assumed that the compiler would do something like assign the value to a BIN(31) and display the entire 31 bits, or something like that. My apologies for not following up by posting the answer.
- mb
markboonie