|
Hans wrote:
Allowing record names to be the same as file names would require a major rewrite to the handling of files and records in the compiler, with implications throughout the code, as well as the rules of the language.
I'm not saying it can't be done. It's just that it involves one heck of a lot of code change in the compiler, and the only advantage to the RPG programmer is that she can avoid one RENAME on the F-Spec.
how does that email expression of mock puzzlement go? Is it "Huh?"
RPG procs need to be improved so that file declares can exist within the scope of the proc, right? Where a file can be declared at the proc level and auto opened and closed as the proc is entered and exited. ( just like the way files declared at the pgm level behave ) Also very useful would be a file handle returned by the open of a file that can be passed from proc to proc and used for i/o against the open of the file the handle represents.
Since procs already ( guessing ) have an automatic storage environment that they operate in, the data structures of a proc declared file could be implemented within that auto storage arena, completely bypassing the archaic static structures of program declared files. What this buys is the near zero need to change existing file i/o compiler code as the new proc declared file i/o code is added to the rpg compiler.
I appreciate the constraints that the rules of the language impose, but can it be argued that proc rpg is capable of being a programming language onto itself, with language rules that only have to apply to itself? After all, ILE is capable of stiching procs of different languages together. Adding a new "proc rpg" language to the mix would not be a problem for ILE.
As an Amazon Associate we earn from qualifying purchases.
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.