×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
IF %PARMS >= %PARMNUM(EntVars);
EntVarCount = Entvars.Count;
For idx = 1 to EntVarCount;
ptr_Entvar = %ADDR(EntVars) + Entvars.Offset(idx);
LoadedCount += 1;
loadedVars(LoadedCount) = P#Entvars;
Endfor;
Endif;
You might also be able to get away with this definition.
However, from what I recall the array elements may be presented in reverse order in memory.
So using the pointer and address to access them would return them in the expected order.
Dcl-Ds VarParam Len(1282) TEMPLATE QUALIFIED;
Count Int(5) INZ;
Offset Int(5) DIM(20);
var Likeds(input_Variable) Dim(20);
End-Ds;
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Roger Harman
Sent: Thursday, March 5, 2020 4:32 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Redefining input parms into an array
I have a command processing program I'm writing in RPG. I have 3 fixed parms and then a recurring pair of parms (20 pair).
I'm having problems getting a redefine to work on the PR/PI.
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.