You can use the DEFAULT statement to specify one or more defines which are to be invoked automatically for subsequently entered usercodes.
Syntax
── DEFAULT ─┬─────────────────────────┬────────────────────────────────┤ │ ┌◄───────── , ────────┐ │ └─┴─<define identifier>─┴─┘
Explanation
The DEFAULT statement causes the listed define or defines to be invoked in each subsequent USER segment immediately following the <user heading>. Each DEFAULT statement overrides any DEFAULT statement previously specified. To cancel the automatic application of the default define or defines, enter a DEFAULT statement with no define identifier.
For example, suppose the following values are to be assigned to the usercode attributes for all users:
MINPW = 1 MAXPW = 1 SHOWFILES CHARGEREQ CLASS = 2 ANYOTHERCLASSOK FAMILY DISK = DISKA OTHERWISE DISKB CANDEGETMSG
A DEFINE statement can equate an identifier to this list of attributes and their values, as follows:
DEFINE ALLUSERS = MINPW = 1 MAXPW = 1 SHOWFILES CHARGEREQ CLASS = 2 ANYOTHERCLASSOK FAMILY DISK=DISKA OTHERWISE DISKB CANDEGETMSG PASSWORD =#
You can then use the define ALLUSERS in a DEFAULT statement as follows:
DEFAULT ALLUSERS;
Then, whenever you want to create a usercode, you only need to enter a USER statement with a usercode and password. MAKEUSER automatically applies ALLUSERS to the usercode. For example, to create usercode USR with password LARDER, enter
+ USER USR LARDER;
MAKEUSER automatically applies the default attribute values and creates the usercode accordingly. If you set the LIST option, MAKEUSER displays the new usercode, as follows:
<< ENTERED USER = USR MAXPW = 1 MINPW = 1 PASSWORD = ? SHOWFILES CHARGEREQ CLASS = 2 ANYOTHERCLASSOK FAMILY DISK = DISKA OTHERWISE DISKB CANDEGETMSG
You can use the default define in a similar fashion to update the attribute values of an existing usercode.