|
>1. Put all the primary code in a procedure >2. Export the procedure >3. In the subprogram mainline, simply put a > call to the procedure -snip- >Until I did this on a program with a file. It >seems that no combination of things I tried >will allow me to intermix calls to a procedure >and calls to the mainline. I am clearly not the brightest bulb in the pack, and don't understand the problem. Here is code that to me appears to match your scenario. I get no errors with it when I call it repeatedly from the command line. Could you doctor it up to match your failing scenario so that I could understand the pitfall you're describing? h/copy qrpglesrc,stdhspec * dbgview(*list) tgtrls(*current) fqrpglesrc if e disk usropn f rename(qrpglesrc: src) d getrec pr /free callp getrec(); *INLR = *On; /end-free p getrec b export d getrec pi /free if not %open(qrpglesrc); open qrpglesrc; endif; read src; return; /end-free p
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.