English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

Redefine the field as a pic x(n) field.
Where n is the number of digits in the packed field plus 1 divided by 2.
This is assuming that the number of digits in the packed field in odd. If the number is even then you are stupid and add 2!!

2006-10-13 22:57:13 · answer #1 · answered by AnalProgrammer 7 · 0 0

01 binary-number s9(4) comp value 15. 01 text-binary-number redefines binary-number. 03 filler pic x. 03 test-unsigned-value pic x. 01 packed-number s9(3) comp-3. 01 text-packed-number redefines packed-number. 03 filler pic x. 03 packed-sign pic x. procedure division. if test-unsigned-value and packed-sign equals test-unsigned-value then ... end-if. That should work for unsigned values. set the binary value to 13 for negative and 12 for positive. And don't forget to close your previous questions and allocate 10 points!!!

2016-05-22 00:44:03 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers