× 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.



fkany@xxxxxxxxxxxxxxxxxx wrote:
> 
> ARR744 is an old RPGIII program that receives parameters, performs complex
> calculations, then returns values to the calling program. I created an
> RPGIV program that uses this RPGIII program to get needed information.  The
> RPGIV program uses all subprocedures, which forced me to define ARR744 as a
> prototype in order to call it.  If there's another way to do it, I'd like
> to know.
> 

Frank, using a prototype to call ARR744 is good, even if ARR744 can't
use the prototype.  The prototype should exactly match what ARR744
expects, so the prototype should look like this.
D GETCUSTOMER     PR                  EXTPGM('ARR744')
D  $START1                      30
D  $CUST1                        7
D  $CTL1                         1

It's not actually necessary to use a prototyped call.  You can use a
CALL operation from a subprocedure.  But it's way better to use a
prototype - if the prototype is correct, you avoid the problem you just
had.  If that program has to be called again, you already have the
prototype done, so the error with the too-short parm won't happen
again.  (Assuming you put the prototype in your /copy file with your
other prototypes.)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.