|
Mike, If you bind to a module then it is bound by copy and part of the program you are creating. If you bind to a service program then it is bound by reference and not part of the program object, it just puts in the links to find it at run time. You can create a module for your program object and then use CRTPGM to create the program if you want but I combine the two steps into one with CRTBNDRPG because it is easier to do. Your second case with the CL you have two choices. If you want it all bound together then your rpg program has to be created as a module and then bound into the CL. The second choice is to just do a dynamic call to the rpg from the CL, then they are not bound together and the program is just located at run-time. Remember, anytime you bind a module into another program it is bound by copy which means that program has a copy of the module in it. If you change that module you have to rebind every program that uses it. On the other hand, when binding to a service program it is bound by reference which means the program just references the service program. You can change the service program and all programs that use it will automatically get the new version without having to be touched at all. Because of how this works it is my opinion that binding modules is a bad thing (remember my opinion) because of the maintenance nightmare it can cause. Make a change to a module and forget to rebind a program that uses it. I only bind to service programs. Because of this, I also feel it is much easier to put the binding/activation group info in the H spec thus allowing me to compile and create my program objects in one step as opposed to creating a module and then CRTPGM which takes two steps. What is comes down to is my approach makes it our system easier to maintain in the long run and I have not given up any functionality in the process. Just my opinion, Scott Mildenberger > -----Original Message----- > From: Smith, Mike [mailto:Mike_Smith@RGCResources.com] > Sent: Friday, October 19, 2001 9:03 AM > To: 'rpg400-l@midrange.com' > Subject: RE: binding directories > > > ok, the fog is starting to clear a little. > but as i said, i'm thick headed. > first, i thought that the idea was have everything for 1 program bound > togeather, and it seems, that if you do a crtbndrpg on the > module, and then > do a crtpgm , that that is not happening- or am i missing something? > > second. > suppose now i have clpgm1, pgm1, srvpgm1 and srvpgm2. does > that change > anything. > would i crtbndcl, crtpbndrpg, crtpgm. - assuming i missed > something on the > above- how does the cl get bound together with the rest of > the program? > > -----Original Message----- > From: Scott Mildenberger [mailto:Smildenber@Washcorp.com] > Sent: Friday, October 19, 2001 10:43 AM > To: 'rpg400-l@midrange.com' > Subject: RE: binding directories > > > Mike, > > I use CRTBNDRPG to create the programs and never create a > module for the > program object, thus it doesn't need to be in the binding > directory. This > also means that it is not necessary to have a binding > directory for each > program, they can all use the same one to access the service > programs. Or > you can have several to group service programs if it makes sense. > > Scott Mildenberger > > > -----Original Message----- > > From: Smith, Mike [mailto:Mike_Smith@RGCResources.com] > > Sent: Friday, October 19, 2001 8:39 AM > > To: 'rpg400-l@midrange.com' > > Subject: RE: binding directories > > > > > > scott, > > i'm not sure i understand your last sentence. i'm a little > > thick headed. > > what i'm currently doing is i create module PGM1. Create a binding > > directory with Module(pgm1) and the service programs(SRVPGM1 > > and SRVPGM2) > > Then as you have suggested, i have the binding directory in > > the H spec. The > > thing i am doing is doing this same thing for each program, > so i have > > SRVPGM1 and SRVPGM2 in numerous binding directories. > > > > are you suggesting that i don't need the module in the > > binding directory? > > > > -----Original Message----- > > From: Scott Mildenberger [mailto:Smildenber@Washcorp.com] > > Sent: Friday, October 19, 2001 10:23 AM > > To: 'rpg400-l@midrange.com' > > Subject: RE: binding directories > > > > > > Mike, > > > > I would put the service programs into a binding directory. > > Then I would use > > the H-spec in the programs to specify the binding directory > > and activation > > group info. Then all the compiles can be done with default > > options and no > > need to create the module objects for the programs. > > > > Scott Mildenberger > > > > > -----Original Message----- > > > From: Smith, Mike [mailto:Mike_Smith@RGCResources.com] > > > Sent: Friday, October 19, 2001 8:21 AM > > > To: 'rpg400-l@midrange.com' > > > Subject: binding directories > > > > > > > > > I'm just looking for what other people are doing. > > > assume i have > > > pgm1 and srvpgm1 and srvpgm2 > > > pgm2, srvpgm1, srvpgm2 > > > pgm3, srvpgm1, srvpgm2, srvpgm3 > > > pgm4, srvpgm1, srvpgm2 > > > > > > In this scenario, pgm1, pgm2, pgm3, pgm4 are all within the > > > same system. > > > > > > would you typically, > > > > > > A. Not create binding directories at all. > > > B. Create 1 binding directory for all of these and > just add to the > > > binding directory for additional programs > > > C. Create a separate binding directory for each program. > > > D. Other- please explain > > > > > > > > > As i said, i'm just looking for how others are doing these > > > kind of things, > > > to better how i'm handling these types of things. > > > > > > > > > Mike Smith > > > Information Systems > > > RGC Resources > > > > > > > > > _______________________________________________ > > > This is the RPG programming on the AS400 / iSeries (RPG400-L) > > > mailing list > > > To post a message email: RPG400-L@midrange.com > > > To subscribe, unsubscribe, or change list options, > > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > > > or email: RPG400-L-request@midrange.com > > > Before posting, please take a moment to review the archives > > > at http://archive.midrange.com/rpg400-l. > > > > > _______________________________________________ > > This is the RPG programming on the AS400 / iSeries (RPG400-L) > > mailing list > > To post a message email: RPG400-L@midrange.com > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > > or email: RPG400-L-request@midrange.com > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/rpg400-l. > > _______________________________________________ > > This is the RPG programming on the AS400 / iSeries (RPG400-L) > > mailing list > > To post a message email: RPG400-L@midrange.com > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > > or email: RPG400-L-request@midrange.com > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/rpg400-l. > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.