Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

iSeries / AS400 FAQ : Programming : RPG : How can I get started with subprocedures?

0
10 Posted

iSeries / AS400 FAQ : Programming : RPG : How can I get started with subprocedures?

0

Q. I would like to get started using sub-procedures, but it looks like there is a lot to have to understand all at once. Is there a primer for beginners? My primary interest is in avoiding knowing any more about a procedure than the function and the parm(s). I have a strong desire to NOT know who is maintaining the code, etc. I don’t really even want to look inside the code. A. That is the whole point of procedures (at least those procedures intended for general consumption via the public interface of a service program). All that the consumer of the function needs to know should be apparent from the prototype. For example, call function A passing X, Y, and Z and receive R as a return value. The consumer does not, and should not, care how the procedure does its stuff–only that it does. Procedures used in this way are black-box building blocks from which a more complex application can be built. Private procedures (i.e.

0
10

Q. I would like to get started using sub-procedures, but it looks like there is a lot to have to understand all at once. Is there a primer for beginners? My primary interest is in avoiding knowing any more about a procedure than the function and the parm(s). I have a strong desire to NOT know who is maintaining the code, etc. I don’t really even want to look inside the code. A. That is the whole point of procedures (at least those procedures intended for general consumption via the public interface of a service program). All that the consumer of the function needs to know should be apparent from the prototype. For example, call function A passing X, Y, and Z and receive R as a return value. The consumer does not, and should not, care how the procedure does its stuff–only that it does. Procedures used in this way are black-box building blocks from which a more complex application can be built. Private procedures (i.e., those that exist within a program or those that are not part of the

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.