Commands that are to be run in batch should not have optional parameters that will invoke functions requiring interactive intervention; if a command can be used in batch, it should be usable in all circumstances.
Note: An example of where this rule is violated can be found in the CA 2E Toolkit Build object list (YBLDOBJLST) command. It is possible to use the YBLDOBJLST command in batch, but if a value of FILTER(*YES) is specified, it will crash when it attempts to prompt for filtering values.
If RTNVAL(*YES) is specified for a command parameter, MIN(1) should also be specified. If the command is for use in CL programs and is to have a value returned to it, it should be compulsory. If MIN(1) is not specified, execution of the command may result in the Command Processing Program (CPP) attempting to return a value to a non existent parameter (there is no way of detecting a null pointer in a HLL CPP).
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |