×
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.
Thanks a lot. If in my procedure fparm1, fparm2, fparm3 are not going to change upon successful completion of calls to Myprocedure1 and Myprocedure2, so I need to modify them with const right.
Upon successful completion of Myprocedure1 xmlDS gets populated, do I need to define var?
Upon succesful completion of Myprocedure2 DSfile1, DSfile2, DSfile3,DSfile4 get populated, should I need to define as var?
I am going to code
clearDSfile1;
clear DSfile2;
clear DSfile3;
clear DSfile4;
in Myprocedure2. Thanks !
p Myprocedure b export
d procedure pi N
d fparm1 10 0 const
d fparm2 2a const
d fparm3 22 0 const
d xmlDS likeds(ds_xml) dim(333)
d DSfile1 likeds(file1ds)
d DSfile2 likeds(file2ds)
d DSfile3 likeds(file3ds)
d DSfile4 likeds(file4ds)
d DSerror likeds(error_DS)
/free
if Myprocedure1(fparm1:fparm2:fparm3:
:xmlDS:DSerror);
if Myprocedure2(fparm1:fparm2:fparm3:
:xmlDS:DSFile1:DFile2:DSFile3:DSFile4:DSerror);
endif;
endif;
/end-free
From: "Anderson, Kurt" <KAnderson@xxxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Monday, 14 May 2012, 19:24
Subject: RE: understanding inz in PI
Amanda,
Whenever I have output-only parameters, the first thing I usually do is clear/initialize the output. If you can guarantee a value will always be assigned to an output variable, this initialization is not necessary.
Input - parameters that won't change
Input/Output - parameters with a value that the procedure needs, and the parameter value may change
Output - the parameter is used to return data to the caller only.
I don't see Const on any of the parameters in your PI. The procedure can modify all of the parameters sent to it?
-Kurt
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.