# Starting a user shell (STRCICSUSR) - IBM - AS/400

The STRCICSUSR CL command starts a CICS user shell associated with an active CICS control region for the OS/400 user who initiates this command. This command can be used by anyone on the OS/400 to start CICS transactions.

Some users may implicitly start this command by choosing a menu option that causes this command to be executed.

In its simplest form, this command consists of:
STRCICSUSR CTLRGN(sysid)

This starts a shell that is associated with a specified control region, and therefore runs under this control region. Changing the sysid enables you to associate the shell with any available control region.

You should avoid invoking interactive CICS shells from within a COBOL program as this may cause unpredictable results during exceptions after the shell has terminated.

The full syntax diagram and the description of each parameter for this command follows.

CL command defaults
The defaults given in the CL command description are those that are supplied with the OS/400 system. You should check that your installation has not made any changes to these command default parameters.

STRCICSUSR
Flowchart

Notes:

1. The DATA parameter is required when TRANID(*DATA) is specified.
2. All parameters preceding this point can be specified positionally.

Function
The start CICS user (STRCICSUSR) command starts a CICS user shell associated with an active CICS control region for the OS/400 user who initiated this command. The command also specifies whether a CICS transaction is to be initiated when the CICS user shell has been started.

Required parameters

1. CTLRGN
2. The name of the CICS control region with which the CICS user shell will be associated. The name of the CICS control region is also known as the CICS system ID.
control-region: The name of the control region may be up to four characters in length. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.

Optional parameters

1. TRANID
2. The name of the CICS transaction identifier used to initiate a CICS program identifier defined in the CICS processing program table. Possible values are:
*NONE: The default CICS screen (which is blank) is displayed, prompting the CICS user to enter the CICS four-character transaction identifier. When the CICS transaction is completed, the CICS user shell will stay active, waiting for the next transaction from the user. This process is known as a multishot CICS transaction environment.
*DATA: Specifies that the first four characters of the DATA parameter are used as the CICS transaction identifier, to be the first transaction. This too is a multishot CICS transaction environment, because the shell remains active after the initial transaction is completed.
transaction-id: The transaction identifier may have a maximum length of 4 characters. The first character must be alphabetic, or one of the special characters $, @, or #. The remaining characters can be alphanumeric or one of the special characters$, @, or #. Lowercase transaction identifiers entered in this parameter are converted to uppercase; it is not possible to enter lowercase transaction identifiers.

Use of this value means that when this CICS transaction is completed, the CICS user shell returns to the point at which the STRCICSUSR command was entered, and no other transaction is executed. This process is known as a single-shot CICS transaction environment.

3. DATA
4. Indicates the data that is to be used to prime the CICS terminal input/output area (TIOA) for the first RECEIVE command.
Possible values are:
*NONE: No data is passed to the CICS transaction.
initial-TIOA-data;: Can be up to 3000 characters. The following restrictions apply to this value:
– If the first characters equal *CICS, the results will be unpredictable.
– If TRANID(*DATA) is specified, the first four characters will be taken as the transaction identifier.

Examples
The command

STRCICSUSR CTLRGN(PURC) TRANID(ORDR) DATA(ORDR 678BROWN99)

starts a shell in control region PURC and executes transaction ORDR in a single-shot transaction environment, passing “ORDR 678BROWN99” as the initial TIOA data.The TIOA data, in this example, includes the transaction ID so as to be identical in structure to the TIOA data that would typically result from interactive initiation of the transaction.