You can pass parameters to a persistent procedure just as you can to any other procedure. If you pass INPUT parameters to it, they are available throughout the life of the persistent procedure. If you pass OUTPUT parameters to it, their values are returned to the caller at the end of the persistent procedure’s instantiation. This is represented in the figure on Instantiate the persistent procedure by the arrow that returns control to MainProc.p. (Here and elsewhere in this discussion, you should understand that INPUT-OUTPUT parameters have the same characteristics as both INPUT and OUTPUT parameters where this is concerned.)

In practice, you should not normally pass parameters of either kind to a persistent procedure. This is because the best model for using persistent procedures is to initiate them with a RUN statement, and then to access the procedure’s contents afterwards with other statements. This is strictly a matter of programming style—there’s nothing wrong with passing parameters per se. Perhaps the best argument for not doing it is that if you instantiate a persistent procedure simply by running it with no parameters, you maximize the flexibility of how you access it. If it has parameters, then you must always be sure to pass the right parameters when you start it up, which can introduce maintenance problems if the parameter list must change.