NOTICE: Significant community changes coming soon
The header menu and the home page on our community will be changing soon. Get more information HERE.
Absent Member.
Absent Member.
1773 views

Invalid picture strings

Jump to solution

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

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

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.

View solution in original post

0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

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.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.