IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
47 stars 25 forks source link

COBOL - Go To Reference of Intermediate Data Name Ignores COBOL Context #362

Closed davidkcoblentz closed 7 months ago

davidkcoblentz commented 8 months ago

Development environment used

Go To Reference of Intermediate Data Name Ignores COBOL Context

Detailed steps for reproducing the problem:

  1. Create a COBOL source program that has a data name that is defined as an intermediate data name in multiple 01 Level definitions. for example see COBOL data name HIGHEST-ASSEMBLY-ID in the pic below. It is defined as in intermediate (15 Level) under multiple 01 levels. HIGHEST-ASSEMBLY-ID OF ORIGINAL-USER-REQUEST OF COMMON-WORK-AREA-2 and HIGHEST-ASSEMBLY-ID OF ORIGINAL-USER-REQUEST OF MWW001P
  2. Using SHIFT+F12 issue the GO TO REFERENCE command with the cursor in the HIGHEST-ASSEMBLY-ID data name.
  3. The GO TO REFERENCE spyglass list does not consider the COBOL Context of the intermediate data name but lists ALL references to HIGHEST-ASSEMBLY-ID regardless of COBOL context to the 01 level.

Observed behavior

Note the COBOL context of HIGHEST-ASSEMBLY-ID referenced in Working Storage in the pic below is: HIGHEST-ASSEMBLY-ID OF ORIGINAL-USER-REQUEST OF COMMON-WORK-AREA-2.

In this program HIGHEST-ASSEMBLY-ID is also defined as an intermediate data name as part OF ORIGINAL-USER-REQUEST OF MWW001P.

In the spyglass code view HIGHEST-ASSEMBLY-ID OF ORIGINAL-USER-REQUEST OF MWW001P is listed but I would not expect it to be since it is not part of the original Go To Reference data name of COMMON-WORK-AREA-2.

Expected behavior

I would expect the spyglass code view to only list references to HIGHEST-ASSEMBLY-ID as part of the 01 Level COMMON-WORK-AREA-2 without listing references of to HIGHEST-ASSEMBLY-ID as part of the 01 level MWW001P.

image

*** Also noticed that if Go To Reference is used on elementary item MESSAGE-IND OF MWW005B it does not show the spyglass code view even though another reference exists besides the definition

I am attaching the COBOL source of this program. SC0WWFIC.txt MWW001P.txt MWW005B.txt

Russell-May commented 7 months ago

I agree, this looks like a bug. I'll look into it.

phaumer commented 7 months ago

@davidkcoblentz we fixed it in v3.3.2. Can you verify?

davidkcoblentz commented 7 months ago

Thanks Peter!! I verified the change, and it works fantastic!! Thank you very much!

@.***

From: Peter Haumer @.> Sent: Monday, November 27, 2023 6:41 PM To: IBM/zopeneditor-about @.> Cc: Coblentz, David @.>; Mention @.> Subject: Re: [IBM/zopeneditor-about] COBOL - Go To Reference of Intermediate Data Name Ignores COBOL Context (Issue #362)

@davidkcoblentzhttps://urldefense.com/v3/__https:/github.com/davidkcoblentz__;!!OgnrLJOUc50AAzM!OA-LT_X8raYsNZB283VfBHtGBrNU3GlWyPtz5NVXsoPBrCyKaSFF50L1lkaHcW8d0tIaYkuebc3cfGLjsKRMz_0FJg$ we fixed it in v3.3.2. Can you verify?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/IBM/zopeneditor-about/issues/362*issuecomment-1828925244__;Iw!!OgnrLJOUc50AAzM!OA-LT_X8raYsNZB283VfBHtGBrNU3GlWyPtz5NVXsoPBrCyKaSFF50L1lkaHcW8d0tIaYkuebc3cfGLjsKSmDHBmRg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ATC2YG2FIFI6WLCCLBCWZRDYGU6KLAVCNFSM6AAAAAA6S4YOJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYHEZDKMRUGQ__;!!OgnrLJOUc50AAzM!OA-LT_X8raYsNZB283VfBHtGBrNU3GlWyPtz5NVXsoPBrCyKaSFF50L1lkaHcW8d0tIaYkuebc3cfGLjsKSUW3qHyA$. You are receiving this because you were mentioned.Message ID: @.**@.>>