Supply default values for command parameters whenever possible. Default to the most commonly required value. For example:
CPYSRCF TOMBR(*FROMMBR) MBROPT(*REPLACE)
If a parameter is optional, rather than allowing it to take a blank value, use a special value of *ALL or *NONE to specify what the meaning of the default value is—that is to say use ‘visible defaulting’.
Special values for command parameters should always begin with an asterisk, for instance *ALL, *LIST, *NONE, *YES, *NO. A special value indicates a function or default action. Explicit values should not begin with an asterisk, for instance the default name of a file that is to be used, such as QTXTSRC.
If a special value other than *ALL is used for the first element of a qualified name representing a library/object reference, then it should be a single value. For example, REFOBJ(*PGM), not PGM(*LIBL/*PGM).
Specify the most important values first so that they appear first in the CHOICE text that appears on the right-hand side of iSeries commands. Specify the default value first.
Do not use *N as a special value, as it is reserved as the Null value for the CL command parser.
Where two values are opposites appearing in a list, use *NO as a prefix for the antonym. For example, *SRC/*NOSRC, *SECLVL/ *NOSECLVL.
Where a special value relates to another parameter, it should be derived from the keyword for the based-on parameter, for example:
FILE(file-name) MBR(*FILE)
JOBD(job-description-name) OUTQ(*JOBD)
If the values allowed for a parameter are conditional on the value entered for another parameter, you should use the CL ‘Dependent Definition’ (DEP) statement to cross-check the values. On iSeries, you can use the PMTCTL keyword to direct the prompting of the second parameter.
If it is necessary to supply a default name for a library in which to create objects, the special value *CURLIB should be used. For example, UCRTPF FILE(*CURLIB/X)
Use existing OS/400 special values where possible. For example:
Standard Values - Validation:

Standard Values - Defaults:

Standard Values - Libraries:

Standard Values - Authorities:

Standard Values - User Classes:

Standard Values - Assistance Levels:

Standard Values - Message Delivery:

Standard Values - Relational Operators:

Standard Values - Data Types:

Standard Values - Database:

Standard Values - Locks:

Standard Values - Compiler Options:

|
Copyright © 2014 CA.
All rights reserved.
|
|