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



Alan,

I'd do what IBM effectively does with its API's - they pass a
data-structure and a separate field which defines the format of the
data-structure.

e.g.

CALL ORCPRIPGM
PARM 'GetBase' OPTION
PARM GetBaseStruct

or

CALL ORCPRIPGM
PARM 'GetCust' OPTION
PARM GetCustStruct

(can't remember fixed-format code layout, but you get the point)

I'm not saying that having separate procedure in a *SRVPGM isn't better (it
most certainly is!), but using a single program to perform multiple
different tasks based on the input it receives isn't as complex as you seem
to be saying - you don't need to pass multiple parameters, just a structure.

In fact, I've done this many, many times in the past, and I wouldn't call
it a disaster at all - it works extremely well, and has little to no
noticeable performance hit over calling a *SRVPGM.

Rory


On Sat, Jul 19, 2014 at 10:32 PM, Alan Campin <alan0307d@xxxxxxxxx> wrote:

Now how do you do that with a program? The only way I know to do something
like that would be to create a program with function number and every
parameter passed at once and that have a switch to figure out which logic
to call. I would call that a disaster and how many people would actually do
it?

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.