Skip to main content

SIGN - IN A STRING ON THE LEFT

  • April 23, 2022
  • 2 replies
  • 1 view

Hi, I have a number declared : 77 MY-NUMBER PIC S9(5)V99    and for printing it : MY-NUMBER-PRINT PIC -ZZZ.ZZZ.ZZ9,99

When I print it the minus sign appears in the first left space  es.     -       123,45. How I can position the minus sign near the 1 ?

2 replies

Thomas Morrison
  • Participating Frequently
  • April 24, 2022

Hi, I have a number declared : 77 MY-NUMBER PIC S9(5)V99    and for printing it : MY-NUMBER-PRINT PIC -ZZZ.ZZZ.ZZ9,99

When I print it the minus sign appears in the first left space  es.     -       123,45. How I can position the minus sign near the 1 ?

Standard COBOL

-----,---,--9.99

The terminology is 'floating insertion editing'.  See page 130 of RM/COBOL Language Reference Manual, Second Edition.


  • April 26, 2022

Standard COBOL

-----,---,--9.99

The terminology is 'floating insertion editing'.  See page 130 of RM/COBOL Language Reference Manual, Second Edition.

Great Tom !!!!!      Many many tks !  It works fine !