|
> -----Original Message----- > From: Scott Swaim [mailto:scott@qualitycorps.com] > Sent: Thursday, July 29, 1999 8:36 AM > To: MIDRANGE-L@midrange.com > Subject: Re: Procedures > > > Maybe I did not make myself clear enough. I have figured out > how to writ > the code for procedures. > I don't know where to go from there. > > Do I create a module or bound program? Depends on what the procedure does. When the procedure does something useful only to the program that calls it, I think it belongs in the program. When the procedure provides something many programs can use I think it should be a service program. If you have a large program, you may find that it's more convenient to break it into different modules containing one or more procedures like a C project. This allows you to recompile the module you need to change and relink the program with the UPDPGM command. > do I need a Binding directory? You never _need_ a binding directory. If you have a program composed of many modules, a binding directory makes program creation a lot simpler. > How do I compile the module into the binding directory? You don't. A binding directory is list of modules. When you bind (link) your program a binding directory helps the linker resolve external references--i.e. find the modules that belong to the procedures referenced in the program. Look at the CMDBND menu for binding directory maintenance commands. > Do I make it a service program? See above. > etc. > I suspect others on the list will have some different suggestions. A lot of this is either a matter of taste, shop standards, or depends heavily on the particular situation. First thing I did with procedures was write a recursive factorial routine. Made me feel like I was back in school. Another thing you should investigate is binding C functions into your RPG programs. The C binary search is very fast. I think News400 has some sample code for this. ########################################### The above is my personal opinion and is not intended to represent good programming practice or the product of a sound mind. Joel Fritz +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.