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




On Fri, 13 Jun 2003, Richard B Baird wrote:
>
> could someone help me with a short discussion on the pros and cons of using
> binder language for creating service programs,

Okay, there are no cons.

The "pros" are that the service program can be kept backwards compatible,
which will save you many hours of recompiling things.

> what the different sections are used for (*current, *prv, etc), and the
> best way of maintaining them so that I don't have to recompile
> everything when I change an SP?

*CURRENT is used to signify that this list is the "latest edition" (most
recent version) of your service program's interface.   *PRV says that
it's not the most current, but rather an old version of it.

Why does that matter?   Well, when you compile a new program that uses the
service program, which set of routines do you want it to use?!  Obviously,
the "current" version.   So, you need a way to tell the compiler which one
is "current".

As for what ou need to do...   you don't need to do much.

Just, every time you add a subprocedure, or a group of them, to your
service program, go into the binding source, and change the old interface
to *PRV, and add a new group where the new subprocs are added, making that
new one the *CURRENT.

That's pretty much it.   Binding language is INCREDIBLY simple.  It
doesn't take much to learn.

>
> also, how do you set up your binding directories?  I tend to just have a
> single binding dir for each service program, and declare multiple
> directories in my H specs as needed for all programs that use the SPs.  is
> this how you do them?

I've been finding myself doing that more and more.   I guess the main
reason I do that is that you can't specify BNDSRVPGM on the H-spec, so I
create binding directories with one srvpgm in them, and include THAt on
the H-spec.

>
> One more thing - can you 'bind by copy' a service program to a module
> (either certain functions, or the whole thing)?  or does a 'bind by copy'
> have to be a module with a 'main' entry point?

Well, bind by copy certainly doesn't require a "main" entry point.
However, "bind by copy" and "service program" are mutually exclusive
ideas.

Bind by copy means that an actual copy of the compiled code is embedded
into the *PGM object.   A service program is, by definition, a separate
object on the disk.

Personally, I don't find bind-by-copy to be very useful.  If you want your
code to be used by many programs, then you almost certainly are better off
using a service program rather than a bind-by-copy technique.

>
> I've tried reading the ILE concepts guide, but i'm still fuzzy on these
> topics.  Everytime I look at that thing, my eyes start to gloss over.
>

That's unfortunate.   These things are, IMHO, rather simple things.  Too
many people are afraid of them..   If IBM would write manuals that are
easier to read, it would sure help!!

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.