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



From: Jon Paris

>> I note though that there's really no good way to pass a parameter to a
PERFORMed paragraph.

You don't do it that way Joe - you either simply use the Global variable
represented in Linkage and test in the performed paragraph (which you'd
have
to do anyway even if you passed it as a parm). Moving it to WS doesn't
really help other than in cases where an optional parm simply means to use
a
default value in the calc instead.

The alternative is to do it the ANSI '85 way and use a nested program
instead of a performed paragraph. Nested programs are as close as COBOL
gets to RPG subprocedures. They support local and global storage and if I
recall correctly you can tier the variables so that a variable is local to
the nested program but can be seen by programs nested within it.

What I want to do is pass up to three parameters of the same type, and call
the same paragraph for each one. The paragraph to perform is quite short,
so I guess the idea of moving each one into a common working storage
variable and then performing the paragraph is probably the right way to go.

Joe



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.