The ADD statement is used to add a password entry in the PASSWORD
data set. When the control entry for an online DASD data set is added,
the indicated protection status of the data set is set in the DSCB;
when a secondary entry is added, the protection status in the DSCB
is not changed.
The REPLACE statement is used to replace any or all of the following
information in a password entry: the password name, protection mode
(read/write or read only) of the password, and user data. When the
control entry for an online DASD data set is replaced, the protection
status of the data set is changed in the DSCB if necessary; when a
secondary entry is replaced, the protection status in the DSCB is
not changed.
The syntax of the ADD and REPLACE statements is:
Label |
Statement |
Parameters |
---|
[label]
|
{ADD|
REPLACE}
|
DSNAME=name [,PASWORD1=current-password]
[,PASWORD2=new-password]
[,CPASWORD=control-password]
[,TYPE=code]
[,VOL=device=(list)]
[,DATA='user-data']
|
Note: PASWORD1 can only be coded with REPLACE
|
where:
- DSNAME=name
- specifies the fully qualified name of the data set whose password
entry is to be added or changed. The name must not exceed 44 characters,
including delimiters.
- PASWORD1=current-password
- specifies the password in the entry to be changed. If PASWORD1
is not coded, the operator is prompted for the current password. PASWORD1
can only be coded with REPLACE.
- PASWORD2=new-password
- specifies the new password to be added or assigned to the entry.
If the password is not to be changed, the current password must also
be specified as the new password. The password can consist of 1 to
8 alphanumeric characters. If PASWORD2 is not coded, the operator
is prompted for a new password.
- CPASWORD=control-password
- specifies the control password for the data set.
For ADD,
CPASWORD must be specified unless this is the first password assigned
to the data set, in which case PASWORD2 specifies the password to
be added.
For REPLACE, CPASWORD must be specified unless the
control entry is being changed, in which case PASWORD1 specifies the
control password.
- TYPE=code
- specifies the protection code of the password and, if a control
password entry is to be changed for or assigned to a BDAM online data
set, specifies the protection status of the data set. The values that
can be specified for code are:
- 1
- specifies that the password is to allow both read and write
access to the data set; if a control password is being assigned or
changed, read/write protection is set in the DSCB.
- 2
- specifies that the password is to allow only read access to
the data set; if control password is being assigned or changed, read/write
protection is set in the DSCB.
- 3
- specifies that the password is to allow both read and write
access to the data set; if a control password is being assigned or
changed, read-without-password protection is set in the DSCB.
Default: For ADD, if this parameter
is omitted, the new password is assigned the same protection code
as the control password for the data set. If a control password is
being "added", TYPE=3 is the default. For REPLACE, the protection
is not changed.
- VOL=device=(list)
- specifies the device type and serial numbers of the volumes,
limited to 50, that contain the data sets. If only one serial number
is listed, it need not be enclosed in parentheses. Multiple serial
numbers should be separated with commas.
If omitted, the protection
status in the DSCB is not set or changed, unless the data set is cataloged
and online. This parameter is not necessary for secondary password
entries, or if the desired protection status in the DSCB is already
set or is not to be changed.
- DATA='user-data'
- specifies the user data to be placed in the password entry.
The user data has a maximum length of 77 bytes and must be enclosed
in apostrophes. Any other apostrophes contained within the user data
must be entered as two single apostrophes.
If DATA is omitted from
an ADD operation, 77 blanks are used. If DATA is omitted from a REPLACE
operation, current user data is not changed.