cobolcobol85

Store a string prefix before number in COBOL


I need to store before a number (integer), like Nº423.

I try:

But I don't achieve it. What can I try next?


Solution

  •     01  prefixed-number.
            05  the-prefix pic xx   value 'Nº'.
            05  the-number pic 999  value 423.
    

    I suggest you familiarize yourself with your compiler's documentation on data definitions in COBOL, including the PICTURE clause and the USAGE clause.