Programming Recommendations
This section contains tips and techniques that may help to reduce the coding effort required when writing your own automation procedures, and to improve performance of your automation procedures.
- Use variables, such as &SUBSAPPL, &SUBSTYPE, and &SUBSJOB in place of parameter
values.
To display output from a self-written command, prefix it with the procedure name. To be independent of a possible name change, use the 'parse source' REXX statement which provides the procedure name as the third token.
Using NetView command list language variable JOBNAME for the resource field on an AOCQRY call, an automation procedure can be written to support a known message for any job that can issue a message.
- Use defaults when possible to minimize coding.
- Use generic error codes (see CDEMATCH).
- Use available message parsing techniques:
- Use the NetView command PARSEL2R or REXX PARSE command to parse a message without relying on a field position in a message.
- Parse a message in the NetView automation table and send only necessary fields to an automation procedure.
- Consider not coding the ENTRY field in CDEMATCH calls (default is the SUBSAPPL returned from the last AOCQRY call).
- Use appropriate automation flags.
- Review the coding requirements in IBM Z NetView Customization Guide including restrictions to consider when writing code, such
as:
- Restrictions when TVBINXIT is on
- Variable names
- Macro use
- Register use
- Re-entering programs
- Use SA z/OS automation routines where possible, because they reduce your maintenance overhead.
- Use SA z/OS
processor operations common commands where
possible, because these:
- Are independent of the hardware type of the target system's processor
- Minimize the need for changes to your automation routines as you add new processors to your enterprise
- Consider using the NetView VIEW command to display online help text associated with new code, and to develop a fullscreen interface for new commands that are a part of the new code. Refer to IBM Z NetView Customization Guide for information on the VIEW command.