Almost without exception, I code my pipe, callpipe, and addpipe commands
in this form:
"pipe (listerr end ? name" UsedName"."ExecType"."LineNo()")",
...
Where UsedName is word 6 of parse source and ExecType is word 4:
parse source OpSys CallType ExecName ExecType ExecRes UsedName
Rest
Lineno() is as follows:
...
/*--------------------------------------------------------------------*/
/* Return source statement number of caller. LINENO EXEC
HS0508 */
/*--------------------------------------------------------------------*/
LineNo:
trace n
return sigl /* LINENO EXEC
HS0507 */
Thus, pipes error messages tell the module name, the module type and the
line number of the command where the message was generated. It saves
lots of time in debugging. Since nothing is hard-coded, we can move or
copy code, or rename modules, and not have to worry about going back and
changing names or line numbers.
For the technique to work, you must code the options on every
pipe/callpipe/addpipe, include lineno() in every program, and do the
same parse source in each program.
A few years ago I inherited a system of some 600 modules (about 50%
Rexx). I don't think there was a single 'name' in any of the many
pipes.
Would it be feasible to support a name default, using REXX parse source
and sigl information as above, on each pipe/callpipe/addpipe without a
name option?
Do anyone else like this idea?
- Hobart