Absent Member.
Absent Member.

Cannot evaluate expression - Watching PIC 9 fields.

I am trying to debug a program.

My data structure has a mix of alpha and numeric data.

When the programs stops on a breakpoint, none of the numeric fields show any values.

They just display Cannot evaluate expression, error code '0x80004002'.

If I edit the watch value, I can see the value.

This occurs whether the PIC 9 field has COMP or not.

The structure

   04 INT-X15.
    06 X15-DIRECTION-IND             PIC X(1).
    06 X15-EOR-IND                   PIC X(1).
    06 X15-MAX-COUNT                 PIC 9(4).
    06 X15-TYPE-DESC                 PIC X(20).
    06 X15-REASON-DESC               PIC X(20).
    06 X15-STATUS-DESC               PIC X(10).
    06 X15-WEF                       PIC X(10).
    06 X15-WET                       PIC X(10).
    06 X15-FILE-NUM                  PIC X(14).
    06 X15-DESC                      PIC X(20).
    06 X15-TOTAL                     PIC S9(3)V99.
    06 X15-COUNT                     PIC S9(4).
    06 X15-AUTHORISED-DATE           PIC X(10).
    06 X15-A-NUM                     PIC S9(18).
    06 X15-NUM                       PIC 9(8).
    06 X15-ENTITY-CODE               PIC X(30).
    06 X15-STATUS-IND                PIC X(1).
    06 X15-AVAIL-FLG                 PIC X(1).
    06 X15-TYPE-IND                  PIC X(1).
    06 FILLER                        PIC X(1).
    06 X15-ACCT-NUM-FIRST            PIC S9(18).
    06 X15-ACCT-NUM-LAST             PIC S9(18).
    06 FILLER                        PIC X.


The watch

-        X15    {Length = 234} : "S                                                   3999-12-303999-12-30                                          3999-12-30                                                                                                            M1"    GROUP
        X15-DIRECTION-IND           S                                                       PIC X
        X15-EOR-IND                                                                         PIC X
        X15-MAX-COUNT               Cannot evaluate expression, error code '0x80004002'.    
        X15-TYPE-DESC                                                                       PIC X(20)
        X15-REASON-DESC                                                                     PIC X(20)
        X15-STATUS-DESC                                                                     PIC X(10)
        X15-WEF                     3999-12-30                                              PIC X(10)
        X15-WET                     3999-12-30                                              PIC X(10)
        X15-FILE-NUM                                                                        PIC X(14)
        X15-OPTION-DESC                                                                     PIC X(20)
        X15-TOTAL                   Cannot evaluate expression, error code '0x80004002'.    
        X15-COUNT                   Cannot evaluate expression, error code '0x80004002'.    
        X15-AUTHORISED-BY-USER-CODE                                                         PIC X(8)
        X15-AUTHORISED-DATE         3999-12-30                                              PIC X(10)
        X15-A-NUM                   Cannot evaluate expression, error code '0x80004002'.    
        X15-NUM                     Cannot evaluate expression, error code '0x80004002'.    
        X15-ENTITY-CODE                                                                     PIC X(30)
        X15-STATUS-IND                                                                      PIC X
        X15-AVAIL-FLG                                                                       PIC X
        X15-TYPE-IND                                                                        PIC X




Any Suggestions?





Tags (2)
3 Replies
Absent Member.
Absent Member.

Sorry I forgot - Visual Studio 2015 - Visual Cobol 2.3
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Have you initialized the field if not it could contain anything when first viewded.
Micro Focus Expert
Micro Focus Expert

What you have encountered is a bug in the product that was fixed in version 2.3 update 1. For reference the bug report (RPI) number was 1101961.

If you can update to that version or later you should see the expected result.
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.