|
Hi Jim, Assuming that GetNextSuffix and CloseCCOHD are in the service programs, the eval and callp would simply be references -- the service programs would not be included in BSTORDADD. If you had done a CRTBNDRPG which included the individual modules CARTAGE, DATETIME and SYSTEM, then all 3 modules would be part of BSTORDADD. Of course if you got Jon's post, you probably already figured that out... Regards, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax ----- Original Message ----- From: "Jim Langston" <jimlangston@conexfreight.com> To: <RPG400-L@midrange.com> Sent: Friday, April 27, 2001 4:06 PM Subject: Re: Quick ILE question about service programs > Okay, let me see if I have this straight... > > I created 3 modules, CARTAGE, DATETIME, SYSTEM. I then created 2 service > programs from these 3 modules, CARTAGE and GENERAL. Then I created a binding > directory from these 2 service programs, CARTAGE. > > When I compile my program BSTORDADD it uses this header: > H DftActGrp( *No ) BndDir('CARTAGE') > > I am using 2 different methods to call the functions in the modules in my program: > C Eval FileSuffix = GetNextSuffix(FilePrefix) > C CallP CloseCCOHD > > Eval when the function is returning a value, CallP when the function is not > returning a value. > > Now. What is included in my *PGM? I was thinking the only thing that would > be included in the *PGM object would be the source file, BSTORDADD and that > the modules included in the 2 service programs would be loaded at run time. > > Am I wrong? > > Regards, > > Jim Langston > > Me transmitte sursum, Caledoni! > > "DeLong, Eric" wrote: > > > > Ok, here's my take..... > > > > Module objects are bound directly into the program or service program. That > > is, since a module contains executable code (more or less), you've > > essentially done a /copy. You've made a bigger program because the > > executable code has been bound directly into the compiled program object. > > > > Service programs are bound by reference only. As each service program has > > details about the public and private methods contained within it (binder > > language), the compiler retrieves the address and interface details of the > > exported procedure from the service program and binds that into the program > > rather than the actual executable code. This keeps the program object > > smaller since that executable code was not actually copied into the program > > referencing the exported method. You're really just calling an external > > proc, just like a dynamic call in RPG400. But because the address and > > interface of the program/procedure is determined at compile time, you save a > > heap of work involved in the dynamic call....... > > > > That really didn't come out like I wanted it to. If this doesn't make any > > sense, let me know and I'll try to do better. > > > > hth, > > Eric DeLong > > > > -----Original Message----- > > From: Jim Langston [mailto:jimlangston@conexfreight.com] > > Sent: Friday, April 27, 2001 4:03 PM > > To: RPG400-L@midrange.com > > Subject: Re: Quick ILE question about service programs > > > > When you use the C functions, you bind with the directory QC2LE. > > > > I am a little fuzzy myself and when the modules are included in the *PGM > > object and when they aren't. It is my understanding, which may be wrong, > > that when I CRTBNDRPG I am not including the modules into my *PGM file, but > > just linking to them at run time. > > > > It should be the same with the QC2LE, these modules should just be linked > > so that at run time the OS will load the module and run the code. > > > > Anyone have a different angle on this? > > > > Regards, > > > > Jim Langston > > > > Slava Zharichenko wrote: > > > > > > Hi, > > > i am reading 'Who Knew you....' and finding it very helpful. It written in > > > the plain language and have a bunch of examples, i start reading it and > > > could not stop until reached Chapter 5. > > > > > > I have a question about service program and binding and i think i have an > > > answer but not 100% sure. > > > > > > If i create service program which includes some of system supplied > > > procedures like C math for example, will service program object contain > > > those procedures or it will just bind them the way CRTPGM does? I think i > > > understand correctly when program is created by binding Main procedure > > with > > > service program , service program itself is not 'added' to the Main PGM it > > > just being 'bind' to it for quick address resolution e.t.c > > > > > > Thank you > +--- > | 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.