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 :-)
In both QWKFIX-TEST.COB and QWKFIX-BUG.COB, I have this code
If I delete, not just comment out, the three commented lines
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
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.
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.
produces the error in the procedure division.
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)
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 :-)