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



I'm trying to relate with something you may (or may not) know better.
Have you done any RPG programming? If so, have you ever used a subprocedure? Not a subroutine, a subprocedure. If you have, have you ever called a RPG subprocedure which returned a value, for example:
SpecialPricing = RetrievePricing(CustomerNumber : ItemNumber : QuantityOrdered);
In which RetrievePricing is a subprocedure in your RPG. This subprocedure has three input variables and returns one variable, the pricing.
CALLPRC is CL's way of calling a subprocedure.

Now, let's expand this. Instead of CRTCLPGM let's say you run CRTCLMOD. This creates a *MODULE object instead of a *PGM object. Then let's say instead of CRTBNDRPG you run CRTRPGMOD. This creates a *MODULE object instead of a *PGM object. Now you can bind them together into one program with CRTPGM and specify both modules. Binding is the reason you see BND in the middle of CRTBNDRPG. It automatically takes the module into a program and discards the module.

There's a book about this called ILE Concepts. Now, this is probably heresy but I don't believe I've ever cracked the cover on it.

There's a lot of cool stuff you can do with this, like service programs, creating your own SQL functions out of your existing subprocedures, etc. Wouldn't it be cool to be able to do
Select CustomerNumber, ItemNumber, QuantityOrdered, ItemDescription,
RetrievePricing(Customer Number, ItemNumber, QuantityOrdered), ItemDesc, ...
From mytable
?

Rob Berendt

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.