[go: up one dir, main page]

Menu

#1129 COPY verb errors

GC 3.x
open
nobody
None
5 - default
2025-09-22
2025-07-16
No

Simon. You said create a ticket for my issue with the COPY verb.
The attached README.txt is my best effort to document the problem I have with the COPY verb.
In general, the data from the copy statements is misplaced in the compile listing but not in the actual compiled program.

The only reason I complain is that I sometimes give programs I wrote to someone and because I use my copy books so much it is nicer to give a single file than a program and all its' copy books.

I wrote a program that takes the compile list and make a single file compliable program. I was using QWKFIX-TEST.LST for input when I got the above issue.

It would not surprise me if it were me doing PROGRAMMERERRORS.

That is why I was reluctant to create a ticket.

Michael :-)

2 Attachments

Discussion

  • Michael F Gleason

    In both QWKFIX-TEST.COB and QWKFIX-BUG.COB, I have this code

    000610 CONFIGURATION SECTION.
    ##????
    ##????*SOURCE-COMPUTER. MyLaptop WITH DEBUGGING MODE.
    ##????*OBJECT-COMPUTER. AlsoMyLaptop.
    000650
    000660 SPECIAL-NAMES.
    

    If I delete, not just comment out, the three commented lines

    *SOURCE-COMPUTER. MyLaptop WITH DEBUGGING MODE.
    *OBJECT-COMPUTER. AlsoMyLaptop.
    

    the error of misplacing the COPY text goes away in working-storage but not in the procedure division.

    The other two problems that I put in the readme file remain.

     

    Last edit: Michael F Gleason 2025-07-17
  • Michael F Gleason

    Here's another weirdo. I sequenced QWKFIX-TEST.COB col 1-6 and now the procedure copy books are in the correct place. This does seam like a requirement for correct placement of COPY source code. It should not. I code mostly in fixed format and I put meaningful data in 1-6 and 73-80.

     
  • Michael F Gleason

    Further testing I did convinced me that putting my special data in col 1-6 and an asterisk in col 7 when meaningful/executable code is on the line will produce the error in the listing.

     ##????*    add 1 to sub1.
    

    produces the error in the procedure division.

     
  • Ralph Linkletter

    I just saw this post.
    I use cols 1 -6 and 73- 80 for the WINZOS animator / debugger.
    I made this chage - add 1 to a non existent field (jx)

           PROCEDURE DIVISION. 
    ##????*    MOVE 2 TO JX
                                  MOVE 2 TO K
                                   MOVE 1 TO ORDER-ORIGIN (K)
    
               It compiled with no errors.
    
           0 warnings in compilation group
            0 errors in compilation group 
             COMPILE OF PROGRAM=C:\WINZOS\COBOL\AWRITEBC.COB
    
             Are you sure that Source Fee is NOT in effect.
    
             Ralph
    
     
  • Michael F Gleason

    Ralph.
    The issue is NOT that it does not compile clean, the issue is in the compile listing. cobc option -t
    My compiles ARE Fixed format. I'm OLD and do not use free format very often.

    I have a dozen or so copy books that I use in most of the programs I write. When I want to give someone one of my programs, I process the compile listing with a program I wrote that will convert the listing into compilable code. (fixed format only) That way, it is not necessary to include a bunch of copy books with a program.

    When I am modding code that I might not want to keep the changes, I put the ##???? in 1-6 so I can search for it later. One of many things I put in 1-6. None of which I ever noticed messes up the listing. Probably because I usually resequence the program before converting the listing.

    Nuff said. Thx for your input.

    Michael :-)

     

Log in to post a comment.