How to add one Module to the existing Service Program

195 pts.
Tags:
AS/400
Hi, I want to add or append one new module called 'C' to the already existing service program (SRVPGM) For Example: I have one service program called SRVPGM consists of 2 Modules are A, B. Now I want to add one new Module called 'C' to SRVPGM. How can I do this? when we do UPDSRVPGM does the signature get change?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    UPDSRVPGM doesn't add modules, and it normally wouldn't change a signature unless you changed related binder source.

    Use CRTSRVPGM to recreate a *SRVPGM and add a new *MODULE. If new procedures are to be exported, use binder source and add a new signature with an added STRPGMEXP command in the binder source. If there are no new exports, there is no need for a new signature.

    If the existing signature is kept and a new signature is added, only *PGMs and *SRVPGMs that use the new procedures need to be re-bound (recreated).

    If the existing signature is kept and no new signature is added, then be sure to add your new exports to the end of the binder source so that all current exports have the same relative positions. Again, only *PGMs and *SRVPGMs that use the newly exported procs need to be rebound. Of course, all of those would already be recreated because you'd have to add new source statements that reference the new procs.
    33,210 pointsBadges:
    report
  • hndajad

    Raven,

    when we want add new module you said use CRTSRVPGM for recreation  and add new module to it. My question is what about the old service program and the module it has? will we have delete it to create new SRVPGM if yes what about module in case if we delete those module then? please explaine me here.

    195 pointsBadges:
    report
  • TheRealRaven
    The old *SRVPGM will be replaced (unless you tell the command not to replace the old). Previous *MODULEs will need to exist if they will be part of the new version. You can keep them around, or you can compile them from source.

    If you do not have the current *MODULE objects nor the source for them, then you can't add new modules to the *SRVPGM. In that case, you need to create a new *SRVPGM to hold the new *MODULEs. You'll have two *SRVPGMs instead of one. There is no requirement to put *MODULEs in a single *SRVPGM.
    33,210 pointsBadges:
    report
  • hndajad
    Thank you so much Reven. it does make me lot of sense now. Thanks for your all valuable help.
    195 pointsBadges:
    report
  • TheRealRaven
    Many sites have chosen a standard of "one *MODULE per *SRVPGM". A *MODULE may have many procedures; some procs might be exported while others are only used internally by procs in the *MODULE.
    33,210 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: