In our environment we have the rule of giving meaningful names to the subprocedures that we call, so for example the subp that is responsible for writing a new record in the CUSTOMERS db table will be called CreateNewCustomer and will be callable by the interested programs with a statement of the type
CustomerCode=CreateNewCustomer(SomeParms);
and this is because the procedure was declared with something like:
Code: Select all
DCL‑PR CreateNewCustomer int(10) EXTPROC('CreateNewCustomer');
SomeParms LikeDS(ParmsDS);
END‑PR;
A sort of log4j but much simpler and lighter.
Some of the subprocedures should reside in cl sources.
For example, when a new log needs to be created for a job, there is a cl module that takes care of creating a new log file and giving the overdubfile command for subsequent writings of the log file of a certain job.
Until now, CLP objects were external programs to be called with the normal call.
I would like to make them modules and be able to recall them with something like
CreateNewLog(SomeParms);
instead of:
Callp CLOGS(someParms);
But how should I write the prototype of a cl subprocedure?