|
Hans, >But in RPG ... you could just as easily do without >the *INZSR. Just perform your initializations when you start your >procedure or program, and you're set. However, you must remember that when *INZSR was added, it was still very common indeed to code cycle based programs. In those, there *is* no execution of the mainline when the input files are empty, and thus you can't call EXSR except from the LR calcs (which is what I did in RPG II when the init subroutine had not been executed during detail calcs). The *INZSR ran consistently, whether or not input records existed. Additionally, it let you establish contents of fields prior to 1P output time, which occurs prior to any other chance your code has to perform an EXSR even when input records exist (and you used the cycle). It was / is a very nice feature for cycle programs. For non-cycle programs, it has less merit and some would say obfuscates the code. But at the time, it was a nice addition and naturally can't be removed now anymore than the MOVE opcode can. <g> Doug
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.