Hi
I just wanted to know the differences betweent the below 2 scenarios:
Scenario1:
------------
Create modules of rpgle codes mycode1 and mycode2 and then combine them using CRTPGM command.
Scenario 2:
-------------
Create modules of rpgle codes mycode1 and mycode2 and then create service program for them.
Is there any difference between the abvoe mentioned situations apart from the difference that Scenario 2 will can not by called by itself.
Thanks
Vivek
Software/Hardware used:
AS400
ASKED:
June 12, 2012 1:47 PM
UPDATED:
June 16, 2012 4:18 AM
Is there any difference between the abvoe mentioned situations apart from the difference that Scenario 2 will can not by called by itself.
Yes, a very significant difference.
When you create a service program, you should do it along with a “binder language” member. This can help greatly in the future when you add new procedures to your service program.l
Binder language can allow you to add functions (procedures) to your service programs without needing to recreate the programs that bind to your service programs. You can recompile/recreate your service programs, and your programs that use them can keep working automatically.
The ILE Concepts manual has lots of good info on service programs and binder language. It includes a handy appendix of many common binder language errors along with ‘suggested changes’.
Tom
The scenarios seem to be (1) create a program so that other programs can CALL the new program, and (2) create a service program so that programs can call into it.
Are those the two scenarios you intended? If so, there isn’t a lot of difference between the two for many developers. A dynamic CALL can give results very comparable to calling procedures out of service programs.
The big differences can come later, for example when new functions need to be added to the service program and the interface changes. If you call a program and the parameter list has to change, you often need to change every program that calls it. That’s not necessary with a service program.
Scenario 2 will can not by called by itself.
But where did you get the idea that a service program couldn’t call itself?
And where did you get the idea that an RPGLE program can call itself?
Tom