Highlighted
New Member.
1936 views

COBCH1140 Warning with VALUE clause in copybook; Visual COBOL

Jump to solution

[Migrated content. Thread originally posted on 02 May 2012]

I am getting a warning for every working storage definition with a VALUE clause saying that VALUE can only be used with the INITIALIZE statement. My source format is Fixed. Is there a way to resolve this warning? I have some legacy code that uses the VALUE clause extensively and will cause a lot of recoding to put the initial values in the variable fields. Most of the values are not spaces or zero. Below is an example:

05 NAV-SEC-INFO.
10 FILLER PIC X(05) VALUE ' '.
10 FILLER PIC X(15) VALUE '044044044044044'.
10 FILLER PIC X(02) VALUE ' '.
10 FILLER PIC X(11) VALUE ' LXXO001 '.
10 FILLER PIC X(35) VALUE
'Online Update '.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBCH1140 Warning with VALUE clause in copybook; Visual COBOL

Jump to solution
This warning should not appear for working-storage section data items but it will appear for data items in the linkage or file section because the value clause is ignored for these.

You can get rid of the message by changing the warning level in your project properties on the COBOL tab from Include Warnings to Include Recoverable Errors or Include Severe Errors.

If you wanted to still report other warnings but selectively turn off just this one than you can add the following directive to the project properties COBOL tab:

CHANGE-MESSAGE"1140 N"

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBCH1140 Warning with VALUE clause in copybook; Visual COBOL

Jump to solution
This warning should not appear for working-storage section data items but it will appear for data items in the linkage or file section because the value clause is ignored for these.

You can get rid of the message by changing the warning level in your project properties on the COBOL tab from Include Warnings to Include Recoverable Errors or Include Severe Errors.

If you wanted to still report other warnings but selectively turn off just this one than you can add the following directive to the project properties COBOL tab:

CHANGE-MESSAGE"1140 N"

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.