|
rob=tksaTn4SAz0AvxtiuMwx3w@public.gmane.org wrote: > > What happens in RPGLE? Does it always re-resolve the call? > RPGLE behaves the same as RPG with respect to variables. With a variable, the call is re-resolved whenever the variable changes. If I recall correctly, literals are slightly different - I think RPG/400 does the resolve when the program with the CALL statement is first called (during static initialization) while ILE RPG does the resolve at runtime when the call statement is run. To accomplish the re-resolve part of FREE, you would code something like this. (I'll add this to the FAQ.) First, create a fast-running do-nothing program called something like FREEDUMMY. A 1-line ILE RPG program with just a RETURN works ok. Then change this code: c call 'PGM1' c parms ... c free 'PGM1' ... c call 'PGM1' c parms To this code: D pgm1Var s 21A INZ('PGM1') c call pgm1Var c parms ... * FREE PGM1 c eval pgm1Var = 'FREEDUMMY' c call pgm1Var c eval pgm1Var = 'PGM1' ... c call pgm1Var c parms
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.