Invalid picture strings

I have 2 picture strings that seems to be valid per the documentation (coming from ACUCOBOL), but the compiler is giving errors. Any ideas why these are invalid?

They are:

This one gives error saying "Incompatible qualifiers".

PACT-AMOUNT  PIC S9(9)V99  COMP-3
                 SIGN IS LEADING SEPARATE. 


This one gives error "PICTURE string has illegal precedence or illegal character"

 Disp-Comm-Pct                    PIC ZZZ.Z9.

Thanks

  • Verified Answer

    The "Incompatible qualifiers" is because COBOL does not allow the SIGN clause for other than DISPLAY usage.  ACUCOBOL ignores this error.

    The "illegal precedence" is because if any symbols after the decimal point are Z, then all the symbols after the decimal point must be Z.  Again, ACUCOBL ignores this nonsensical PICTURE character-string and treats it as if all the symbols after the decimal point were Z.

  • Verified Answer

    The "Incompatible qualifiers" is because COBOL does not allow the SIGN clause for other than DISPLAY usage.  ACUCOBOL ignores this error.

    The "illegal precedence" is because if any symbols after the decimal point are Z, then all the symbols after the decimal point must be Z.  Again, ACUCOBL ignores this nonsensical PICTURE character-string and treats it as if all the symbols after the decimal point were Z.