× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<Booth>Why would one use a service program instead of a stand-alone program? and the opposite?</Booth>

A Programm is needed, whenever you need a main procedure (to call the programm from out of the world). As a conclusion of this: your application is needing one or more programms.
From a technical perspective programms could call other programms on as400
very easy (you don't need job controll to do so), so there is no need to have SRVPGMs. The performance advantage of bound calls compared to programm calls is neglectable in real world, so you might be happy with programms only. But (!!!) your application design and readability of your code will have great benefit from using SRVPGMs. Some important points:

- subprocedure names are not limited to 10 chars, so you could use meaningfull names.
- subprocedures allow to take full controll over parameters checked by the compiler.
- grouping sub procedures into SRVPGMs reduces the number of objects (PGMS and SRVPGMs) to deploy.
- grouping subprocedures into SRVPGMs could help to reuse code instead of inventing the wheel over and over again.
- subprocedures could hae a returnvalue - good for readability.
- SRVPGMs have multiple entry points, so Sub Procedures could share statefull variables, reducing the number of parameters to pass.
- SRVPGMs could be used to hold statefull data, reducing the complexity of programms by modularizing.

D*B



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.