External Defined Dataname

I have a 01 data field defined as external within a program because the data is used by many programs and I did not want to pass it from program to program (this is a .net project).  When I am in debug mode, I can not do a quickwatch on any field in the data record.  I says 'Unable to evaluate expression'.  Can you not view external defined data area?

  • Can you attach a code snippet showing the definition of your field, and could you specify which version of the product you are using ? I just tried creating a simple test program with an item defined As EXTERNAL and was able to do a Quickwatch without any problem. I tried defining an elementary item and then as a group item and both were okay.

    Gael

  • There is a known limitation when trying to do a hover or watch or quick watch on a variable that is defined as part of a data file record where that file is itself defined as being external.

    This limitation exists only for managed code and should not be a problem in native.

    There is a current enhancement request open for this functionaility.

    To get around this you could move the record from the files record area to a different area in working-storage that is defined as external and this should work ok.

    Example:

          program-id. Program1 as "externaldebug.Program1".

              select test-file assign to "testfile.dat"

                               organization is indexed

                               access is dynamic

                               record key is key1

                               file status is file-status.

          data division.

          fd test-file  external.

          01 test-record.

             05 key1   pic x(3).

             05 rest   pic x(5).

          working-storage section.

          01 file-status  pic x(2) external.

          01 test-record2 external.

             05 key2   pic x(3).

             05 rest2   pic x(5).

          procedure division.

              open output test-file

              display file-status

              move all "1" to test-record

              move test-record to test-record2

              *> if you hover over test-record or one of its fields it will fail but it will work if you hover over test-record2 or one of its fields.

    Is this perhaps what you have run into?

    Thanks.