IBM / zopeneditor-about

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

RENAMES clause in COPY BOOK causes ambiguous error reported #450

Closed davidkcoblentz closed 1 month ago

davidkcoblentz commented 1 month ago

Type: Bug

COBOL source program contains a COPY statement for a copy book but reports an "Ambiguous reference" to a data name that is the subject of a 66 RENAMES clause. Program compiles successfully.

Error message from IBM z Open Editor:

Copybook 'SSV001' contains the following error: Ambiguous reference to SERV-ORD-REQUEST-ALPHA-STA symbol

Source COBOL program contains:

   01  FILLER                  PIC X(8)  VALUE 'SSV001'.
   01  SSV001.
                COPY SSV001 REPLACING  ==01  SSV001.== BY ====.

Copy Book SSV001.copy contains statements:

     03  SERV-ORD-REQUEST-ALPHA-STA.
       05  AIRPORT-CITY-CODE       PIC X(4).
       05  BUILDING-ID             PIC X.

..... later in the copy book it uses statement

   66  SERV-ORD-REQST-ALPHA-STA-DEPT RENAMES
       SERV-ORD-REQUEST-ALPHA-STA OF SSV001
           THRU SERV-ORD-REQUEST-DEPT-NUM OF SSV001.

Extension version: 4.5.1 VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i7-1270P (16 x 2496)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|31.44GB (11.91GB free)| |Process Argv|--crash-reporter-id b7ea8224-840e-492b-bb08-b8c734dfa15c| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 9c06g630:31013171 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl1:31139838 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 cf971741:31144450 fje88620:31121564 iacca2:31144504 ```
davidkcoblentz commented 1 month ago

Copy book SSV001 SSV001.txt

Russell-May commented 1 month ago

Hi David,

I have been looking into this issue. However, I have been unable to replicate it. Currently I am using your attached copybook file along with just a boiler plate COBOL program with your supplied COPY REPLACING statement in the WORKING-STORAGE SECTION.

   01  FILLER                  PIC X(8)  VALUE 'SSV001'.
   01  SSV001.
                COPY SSV001 REPLACING  ==01  SSV001.== BY ====.

I am getting a clean parse. Are there other data declarations in your COBOL program that might be interfering and causing this issue?

image

davidkcoblentz commented 1 month ago

Thanks for your response. Yes, you are correct, there was another COPY BOOK with the same data name in it. It pointed out the duplicate ambiguous data name. I corrected it by adding a qualifier to the 66 level RENAMES statement. This is a non-issue.

Thank you!

@.***

From: Russell-May @.> Sent: Friday, October 4, 2024 9:36 AM To: IBM/zopeneditor-about @.> Cc: Coblentz, David @.>; Author @.> Subject: [EXTERNAL] Re: [IBM/zopeneditor-about] RENAMES clause in COPY BOOK causes ambiguous error reported (Issue #450)

Hi David,

I have been looking into this issue. However, I have been unable to replicate it. Currently I am using your attached copybook file along with just a boiler plate COBOL program with your supplied COPY REPLACING statement in the WORKING-STORAGE SECTION.

01 FILLER PIC X(8) VALUE 'SSV001'.

01 SSV001.

            COPY SSV001 REPLACING  ==01  SSV001.== BY ====.

I am getting a clean parse. Are there other data declarations in your COBOL program that might be interfering and causing this issue?

image.png (view on web)https://urldefense.com/v3/__https:/github.com/user-attachments/assets/e0371883-839a-4b37-905c-2a0365dbc24e__;!!OgnrLJOUc50AAzM!O1Pd7XggMWXDVmICcxlwLAvEYJapqyD8oZVkHgOLF9E7aD0BAwqtOwZHm_Z7rcMwSqBftfYFrm_NXJtsgsabr5Nyhg$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/IBM/zopeneditor-about/issues/450*issuecomment-2394076375__;Iw!!OgnrLJOUc50AAzM!O1Pd7XggMWXDVmICcxlwLAvEYJapqyD8oZVkHgOLF9E7aD0BAwqtOwZHm_Z7rcMwSqBftfYFrm_NXJtsgsaEMDxVmw$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ATC2YGYGSOCYQQGU2P4QRVLZZ27VLAVCNFSM6AAAAABPIFSDBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJUGA3TMMZXGU__;!!OgnrLJOUc50AAzM!O1Pd7XggMWXDVmICcxlwLAvEYJapqyD8oZVkHgOLF9E7aD0BAwqtOwZHm_Z7rcMwSqBftfYFrm_NXJtsgsZSpMB3Jw$. You are receiving this because you authored the thread.Message ID: @.**@.>>


This email came from outside American. Please avoid clicking links, opening attachments or interacting with emails from unknown senders. If unsure, click the 'Report Phishing' button in Outlook/Webmail menu bar.