|
Thanks Barbara. Brad gave me a very good reading material and now I
understood my first compilation problem.
----- Original Message -----
From: <bmorris@ca.ibm.com>
To: <RPG400-L@midrange.com>
Sent: Wednesday, July 11, 2001 7:03 PM
Subject: Re: CRTSRVPGM
>
> >Date: Wed, 11 Jul 2001 10:29:31 -0400
> >From: "Rex Capio" <rex_capio@swimtrend.com>
> >
> >Brad,
> >
> >Export parameter "*ALL" worked.... Thanks a lot...
>
> Rex, I hope you'll heed Brad's warnings about using *ALL.
>
> If you use the seductively easy *ALL, you will soon be
> asking the much harder question "how do I find all the
> programs that use a service program" because you'll start
> getting errors running your programs as soon as you try to
> add a new procedure or module to the service program.
>
> Using binder source is easy. Here's a step by step:
>
> 1. For all the modules that you want to use in the
> service program, do
>
> ===> DSPMOD DETAIL(*EXPORT) OUTPUT(*OUTFILE)
> OUTFILE(QTEMP/MODINFO) OUTMBR(*FIRST *ADD)
>
> Later in step 4, use cut and paste from column 52 of
> this file.
> 2. Think of a name for the service program (say UTIL). You
> will also use this name for the binder source member and
> the signature.
> 3. Create a source physical file called QSRVSRC, and create a
> source member called UTIL.
> 4. Say your modules are MOD2 and MOD3, and the total list
> of procedures is: PROC1 PROC2 proc3. Here is the code
> for your UTIL source member:
>
> /* ================================================== */
> /* New exports MUST be added at the end. */
> /* Old exports MUST NEVER be removed from the list. */
> /* !!! The order MUST NEVER CHANGE !!! */
> /* ================================================== */
> STRPGMEXP PGMLVL( *CURRENT ) SIGNATURE("UTIL")
> EXPORT SYMBOL("PROC1")
> EXPORT SYMBOL("PROC2")
> EXPORT SYMBOL("proc3")
> ENDPGMEXP
>
> (You could easily write a program to process the outfile
> from step 1 to generate the EXPORT SYMBOLs, but cut and
> paste is easy.)
>
> 5. Now do
> ==> CRTSRVPGM MYLIB/UTIL MODULE(MOD2 MOD3) SRCFILE(QSRVSRC)
> SRCMBR(UTIL) ACTGRP(*CALLER)
> 6. Create a binding directory and add your service program to it:
> ==> CRTBNDDIR MYLIB/MYBNDDIR
> ==> ADDBNDDIRE BNDDIR(MYLIB/MYBNDDIR)
> OBJ((MYLIB/UTIL *SRVPGM))
> 7. Specify BNDDIR(MYLIB/MYBNDDIR) on your CRTBNDRPGs and CRTPGMs.
>
> You're done.
>
> 8. If you want to change any of the procedures in MOD1 or MOD2,
> you just change them and re-create or update the service
> program.
> 9. If you want to add new procedures or new modules, you just
> write them, add the names of the new procedures to the end
> of the procedures in your QSRVSRC, and re-create or update
> the service program.
> 10.If you decide you want more than one service program, you
> just add the new ones to the binding directory.
>
> There are other ways to handle service programs and signatures.
> You can read ILE Concepts for more information.
>
> Barbara Morris
>
> +---
> | 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 mailing list archive is Copyright 1997-2025 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.