× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I don't have that issue, but I always use /INCLUDE instead of /COPY. We have copybooks that still have fixed RPG, so adding **FREE to them would be impractical.

Is your OS current? What about PTFs?




-----Original Message-----
From: Åke Olsson [mailto:konsult@xxxxxxxxxxxxxxx]
Sent: Friday, September 27, 2019 1:40 PM
To: rpg400-l <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Full free form and /copy or /include

I just made a discovery that confused me.



First: I write all new code in full-free form so that I always start with a "**FREE" in column 1 of first line and from there I code the rest more or less from the beginning of the line with indents.



Recently I cut a piece from a program that I need to reuse frequently and saved as a copy source for later use.



When I started a new program I just added the /copy to get all these definitions of import fields and prototypes where they need to be.



Problem is: It did not work! The compiler complained about every single line in the copy source. If I pasted in the lines the compile worked just fine so there was something strange about the /copy (or for that sake /include) itself.



Then I found that if I right-shifted all lines in the copy source 8 or so places the /copy worked fine. But I really want to extract odd pieces from programs and reuse as copy source without changing them.



Finally I found the working solution: Apparently I have to add a "**FREE"
line as the first line to every copy source!



This works - BUT I sort of feel that if I have instructed the compiler that "the following source is free of column restrictions" this should apply also to every piece of code that is copied in before compile.



Is this a bug or a feature?



/Ake H Olsson/





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.