× 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 Mon, 2004-04-12 at 21:57, Joe Pluta wrote:
> So, do I have problems when I do that with a service program?  When two
> jobs call the same service program, I assume they have their own storage
> for variables, right?  If I declare a bunch of variables in the global
> section of a procedure, they're not shared between jobs, are they?

As usual, the answer is "it depends". :-)

If you create the service programs with ACTGRP(*CALLER), then each time
the service program is 'activated' within a job, it will run inside the
calling activation group.  If you have fifty program using *NEW that
activate the service program, then there will be fifty copys of the
service program running.

On the other hand, if you create the service program with a named
activation group, then the service program only gets activated once, in
the activation group that you specified.  This could get confusing if
the name was not unique and ran in an activation group used by a bunch
of other objects: to keep it simple, when I use a named activation group
for a service program I try to make that name unique.  This means now
that regardless of how many "copys" of the service program I need, they
will run in one activation group.  This allows file states, global
variable states and values, etc. to be accessible from seemingly
multiple locations. 

Joel
http://www.rpgnext.com


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.