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


  • Subject: Re: service program question
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Thu, 19 Jul 2001 16:13:44 -0500 (CDT)


The problem with splitting one service program into two service programs
is backward compatibility.   When you compiled the *PGM's that call
routines from your *SRVPGM, they located the service program and decided
which procedures to call.

If you make a totally diffeent service program, they will no longer see
those procedures, and won't work -- unless, of course, you re-bind them.

So, I see two solutions:

1) Follow Njal's excellent suggestion, and split your service program
    up into different modules.  This way, it remains only one serivce
    program, but your global variables can be scoped differently.

2) If for some reason you NEED it to be two separate *SRVPGM objects,
   change the existing procedures so that they call the procedures in
   the NEW *SRVPGM.  This allows the existing *PGM's the ability to
   still call your original *SRVPGM, and allows you to have the 
   same procedures with the same signatures.

Or... at least, that's what pops into my head :)



On Thu, 19 Jul 2001, Smith, Mike wrote:

> What is the process for removing a procedure from a service program and
> making it into its own service program.  
> 
> i want to be careful because this is in production and i don't want to cause
> any problems.  
> 
> i have a procedure within my service program that has global variables.
> iwant to remove this into its own service program.  i just think that as i
> add more procedures to this service program, the global variables will
> clutter it up.  
> 
> So i've decided that if my procedure needs globals, then it will be its own
> srv pgm.  
> 
> 
> Mike
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
> 

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.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.