|
Perhaps you accidentally added the module to your binding directory
instead of the service program?
Try doing a: "WRKBNDDIRE JRSBINDDIR" and see if the entry for
TESTMOD comes up as a "*MODULE" instead of "TESTSRV" as a "*SRVPGM".
You can also use DSPPGM on your program to see how things are bound to the
program.
To make this work, you should be doing something like:
1) CRTRPGMOD TESTMOD
2) CRTSRVPGM TESTSRV MODULE(TESTMOD)
3) RMVBNDDIRE BNDDIR(JRSBINDDIR) OBJ(TESTMOD *MODULE)
4) RMVBNDDIRE BNDDIR(JRSBINDDIR) OBJ(TESTSRV *SRVPGM)
5) ADDBNDDIRE BNDDIR(JRSBINDDIR) OBJ(TESTSRV *SRVPGM)
6) CRTBNDRPG MAINPGM
Hitting F14 in STRDBG allows you add additional service programs ,etc,
and switch to their module source when debugging a program.
HTH
On Thu, 13 Jul 2000, Stone, Joel wrote:
> I created a module (named TESTMOD) and from that created a SRVPGM (named
> TESTSRV). Then I compiled an RPG4 (named mainpgm) which uses a subprocedure
> in the SVCPGM.
>
> The mainpgm points to a binding directory in the H spec as follows:
>
> H dftactgrp(*no) bnddir('JRSBINDDIR')
>
> D loadfield1 PR 6
> d lf_input 10
>
> D field1 s 10
>
> c eval field1=loadfield1(field1)
> c field1 dsply
>
> c seton lr
>
>
>
> When I change the SRVPGM, the mainpgm still runs the old subprocedure.
>
> Here is part of the compile listing of MAINPGM. It appears that the binding
> is static, not dynamic.
>
> E x t e r n a l R e f e r e n c e s
> Statically bound procedures:
> Procedure References
> LOADFIELD1 3 8
>
> Why is the subprocedure LOADFIELD1 statically bound, and not dynamic?? (Why
> doesnt it change when I modify the subprocedure and re-create the service
> pgm)?
>
> All is on OS/400 v4r4.
>
> How can I debug the sub-procedure using STRDBG?
>
> Thanks!
>
+---
| 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.