%act User-defined Action Codes

%act The user-defined processing represented by the mnemonic act will be executed.

%? A summary of all the mnemonic codes stored in the primary and secondary USERACT files will be displayed. Entries from the secondary (central) USERACT file will be identified with a '*'. For further information, see the section below: "Hierarchy of the USERACT Files".

The assignment of the mnemonic %act to the required user-defined process is achieved via the CFS.USERACT file. The structure of this file is described below.

CFS.USERACT file for user-defined Action Codes

CFS administrators and users can utilise the CFS.USERACT file to store alphanumeric mnemonic codes (%act) and their associated processes. Each %-Action Code can represent a single BS2000 DO procedure, a CFS procedure, or a command.

The CFS.USERACT file is a normal SAM file, created with EDT, with 3 different record types:

- Comment records can be inserted anywhere, and are characterised by an asterisk ('*') in column 1.

- Header records have the string '$%TAS%' begining in column 1. A command string follows from column 7, which can take one of the following forms:

-    A BS2000 command, in the form /cmd.

-    A BS2000 DO procedure to be started under control of the Job Report System in Enter mode, in the form E procedure.

-    A TAS command, in the same form as it would be in the TAS command field, e.g. APPL.

-    A command to be executed by CFS (e.g. starting a CFS procedure) must be prefixed with 'CFS'.

Example: CFSDO procedure

Every command can also be enhanced with parameters from the task list, which are represented by abbreviations (see below).

The command can span one or more continuation lines by entering a hyphen ('-') as the last character in the line. Continuation lines begin with '$' followed by one or more blanks and then the remainder of the text.

Additional information relating to the data object marked with the Action Code can be passed to the command to be executed by means of abbreviations in the form !xyz. Any entry from the title line of the task list can be inserted for xyz. Examples:

!TSN TSN of the task marked with the User Action Code.

!USER-ID Userid under which the task runs.

!JOBNAME Job name of the task.

A mnemonic code record (%act) follows a header record.

- Mnemonic cCode records begin in column 1 with an alphabetic character. The fields have the following format (see also example below):

Column 1-4 Variable portion act of the Action Code %act (act: alphanumeric, left justified, first character must be a letter). act may not contain the following strings: TCB, TET, JCB, JTBP

Column 11-80 Free text for description of the Action Code %act and the associated commands, or blanks. The full list of descriptions can be displayed on screen by entering the Action Code %?.

Assignment algorithm: %act <--> command:

A search will be made for the mnemonic code act in the primary USERACT file. The order in which the search for the primary USERACT file proceeds is further described in the section below, "Hierarchy of the USERACT Files", point 1) to 3).

If the mnemonic code act is not found in the primary USERACT file, the search will continue in the secondary USERACT file, $user-id.CFS.USERACT (see below, point 4) ).

If act begins with a number, this is interpreted as a Connection number, and the rest of the string as the mnemonic code. The BS2000 DO procedure associated with this mnemonic code will be passed to the specified connection for execution as follows:

/DO procedure

If a record with the specified description is found, the previous header record ($...) and the command to be executed will be identified. Any abbreviations representing parameters contained in the header record, such as !TSN, !USER-ID, will be substituted with the actual values from the marked data objects.

The Action Code %? can be used to display a list of all mnemonic codes and their respective commands.

Hierarchy of the USERACT Files

The following heirarchy determines which USERACT file is to be used by CFS:

1) Has a File command with LINK=USERACT (/FILE ...,LINK=USERACT) been issued?

2) If no TFT entry with the name USERACT exists, then the job name used in the LOGON command (/.name LOGON ...) will be identified, and used as a suufix for a file named 'CFS.USERACT.' .

3) If no job name was specified in the LOGON command, or if the file CFS.USERACT.name does not exist, a check will be made for a file named CFS.USERACT under the current userid.

4) If none of the above files exist, CFS will finally search for a file called $user-id.CFS.USERACT. $user-id is the userid under which CFS is stored.