CREATE

The CREATE statement causes MAKEUSER to prepare an entirely new version of the USERDATAFILE. The statement can appear only once, before any USER segments are processed. The input is the same as the input in update mode, with the following exceptions:

  • The following forms are invalid:

    • USER

    • REMOTEUSER

    • PRIVILEGES

    • PRIVILEGES - <locator>

  • The forms + USER and + REMOTEUSER are permitted but are redundant because all USER segments and REMOTEUSER segments create new entries.

The file made by the CREATE statement becomes the current USERDATAFILE unless a valid file equation has been made for USERFILE. That is, by default it automatically becomes *SYSTEM/USERDATAFILE, replacing the current SYSTEM/USERDATAFILE, if there is one.

A usercode designated with the SECADMIN attribute only does not have sufficient privilege to use the CREATE statement because a non-usercoded file is created. The user must also be designated with the PU attribute, or with a combination of the CHANGE, CREATEFILE, READ and REMOVE granulated privileges. The required granulated privileges depend on the disposition of the old USERDATAFILE.

Syntax

── CREATE ─┬───────────────┬───────────────────────────────────────────┤
           └─<disposition>─┘

 Caution

When you use a CREATE statement to make a new USERDATAFILE, it is advised that at least one of the following conditions be true:

  • A privileged usercode is defined.

  • A model user entry with privileged access rights is defined.

When either of these conditions is true, you can define new entries in the newly-created USERDATAFILE.

If neither condition is true, no privileged users exist to run MAKEUSER, and no new users can be added to the new USERDATAFILE. It might then be necessary to cold-start the system so that another new SYSTEM/USERDATAFILE can be created, this time with a privileged usercode or privilege-capable model user entry defined.