|
>> The code has several arrays utilizing compile-time data. Module creation fails stating that the use of CTDATA is not allowed in a subprocedure. Not to discourage you from subprocedures, which are wonderful, but you could have turned this into a bindable procedure simply by compiling with CRTRPGMOD and calling it with CALLP. That said - if you want to keep compile time arrays and use them from the subproc(s) then the answer is simply to place them in the Global portion of the source. So your source sequence is like so: H spec F specs D specs for compile time arrays i.e. Global data P spec to start subproc D spec for procedure interface D specs for local data C specs for subproc P spec to end subproc ** compile time data This example compiles just fine: H NoMain D Proc Pr D Array S 4 CtData PerRcd(1) Dim(2) P Proc B D PI C Eval Array(1) = 'X' C return P Proc E **CtData Array abcd efgh Jon Paris Partner400
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.