USER Statement

<user statement>

── USER ── = ── <usercode name constant> ──────────────────────────────►
►─┬─────────────────────────────────┬──────────────────────────────────┤
  └─ / ── <password name constant> ─┘

Explanation

The USER statement changes the usercode of the job. This usercode is not retained across a halt/load. If this statement appears in a subroutine running asynchronously with the job, it changes the usercode of the subroutine only; the usercode of the job is not changed.

The usercode assignment can be used to assign a usercode to a task, as explained in Task Initiation.

The correct password must be given if a password is associated with the usercode. The password associated with the current usercode cannot be changed by the USER statement; the PASSWORD statement must be used instead.

If the job was initiated from CANDE, and this statement changes the usercode from the usercode of the originating CANDE session, then job messages cease being sent to the originating terminal. (Job messages can be output from DISPLAY statements, ACCEPT functions, or BOT, EOT, and EOJ messages.) The messages resume if a later USER statement restores the original usercode.

The USER statement does not affect the accesscode of the job, even if the current accesscode is one that is not normally permitted for the new usercode. If you want the accesscode to be affected, use usercode assignment with MYSELF or MYJOB; this will set the accesscode to a null string if it is not permitted for the new usercode.

Examples

The following are examples of the USER statement:

USER = MYCODE
USER = A/B