%act User-defined Action Codes

%act The user-specific process specified by the mnemonic act will be executed for the marked data object.

%nact The user-specific process specified by the mnemonic act will be executed in the specified Connection n for the marked data object.

% | %? An overview of all mnemonic codes defined in the primary and secondary USERACT files. Those mnemonic codes defined in the secondary (central) USERACT file will be marked with an '*'. For further information, see below: "Hierarchy of the USERACT files".

The assignment of the mnemonic codes %act to the required process is achieved in the CFS.USERACT file. The structure of the file is described below.

CFS.USERACT file for User-specific Action Codes

The CFS administrator and individual users have the opportunity, by means of the CFS.USERACT file, of assigning alphanumeric mnemonic codes (%act) to customised processes. Each %Action Code can be linked to a BS2000 DO procedure, a CFS procedure or any other CFS command.

The CFS.USERACT file is a normal SAM file which can be created from within EDT, and which contains 3 different types of record:

- Remark records can appear at any point, and begin in column 1 with an asterisk ('*').

- Header records begin in column 1 with '$'. Column 2 contains

a '%', followed by any CFS command. It could be, for example, an E command to start a DO procedure in Enter mode under control of the Job Report System. The command can be specified together with an abbreviation (see below) of the name of the data object to be processed.

The name of the data object to be processed can be inserted in the command by using the following abbreviations:

!NAME File or Job variable name

!ELEMENT Library element without version or type

!LIBRARY Library containing the element

!TYP Library element type or Fcbtype of file

!VERS Library element version

Notes:

A header record can be up to 2048 bytes long. If, however, the USERACT file is to be processed with EDT, the maximum record length is limited to 256 bytes.

If the command E do proc is specified in a header record (e.g. $%E CFS.S. LMSLIB(ASSEMB) ), then each data object marked with the relevant Action Code %act (e.g. %ASS) will be processed in its own Enter job under control of the Job Report System. %act? will display the DO parameter mask for the procedure. If a Connection with the number n already exists to $DIALOG under CFS, (e.g. OC1/LOGON ...), then entering the Action Code %nact will cause the Enter job to be executed from within the Connection (e.g. %1ASS).

If the command FT appears in a header record without any abbreviation such as !NAME, !ELEMENT for the file or element name (e.g. $%FT ,,,HOST22,TEST2, A001,,,,*BS2000,TO,NO), then the name of the data object to be transferred will be substituted by CFS at execution time. The same functionality is achieved by the PD Action Code (see CFS.PDFILE). In contrast to %act, only one or two digit mnemonic codes are allowed for mn in PDmn.

If the command DO proc (calling a CFS procedure) appears in a header record, then it must be ensured that only one file or library element is marked with the % Action Code. If more than one data objects are marked, the % Action Code will only be executed for the last item marked.

Each header record has one or more mnemonic code records (%act) associated with it.

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

Columns 1-4 Variable part, act, of the Action Code %act (act: alphanumeric, left justified, first character alphabetic).

Columns 11-80 Free text (description of the command to be executed for the Action Code %act), or blanks. A full list of these descriptions will be displayed by entering either the Action Code % or %? .

Assignment algorithm: %act <--> command created by CFS

The act mnemonic will be sought in the primary USERACT file. For the order in which the primary USERACT file is searched, see the "Hierarchy of the USERACT file" section below, points 1) to 3).

If the act mnemonic is not found in the primary USERACT file, the search will then be made on the secondary USERACT file, $userid.CFS.USERACT (see below, point 4).

If act begins with a digit, this will be interpreted as a Connection number, and the rest as the mnemonic. The command assigned to this mnemonic will then be executed from the specified Connection.

If a record with the specified description is found, the previous header record ($...) will be examined for the required command. Any abbreviations in the form !NAME, !ELEMENT, !LIBRARY, !TYP, !VERS (see above) appearing in the header record will be substituted with the relevant name segments of the marked data object.

The Action Codes % or %? can be used to display a list of all mnemonics currently defined, together with a description of their commands.

Hierarchy of the USERACT files

The USERACT file to be used by CFS is determined according to the following hierarchy:

1) Does a file exist with LINK=USERACT (/FILE ...,LINK=USERACT)?

2) If no TFT entry with the name USERACT exists, then a file with the jobname specified in the LOGON command (/.jobname LOGON ...), prefixed with 'CFS.USERACT.', will be sought. The search will begin first for the file CFS.USERACT.jobname in the current userid, then in the CFS installation userid (see 4).

3) If no Job name was specified in the LOGON command, or if the file CFS. USERACT.name does not exist, then a file CFS.USERACT will be sought under the current userid.

4) If none of the above files exist, CFS will finally search for a $userid.CFS. USERACT, where $userid is the userid under which CFS itself is cataloged.

Example of a CFS.USERACT file:

$%E !LIBRARY(ASS),!ELEMENT                                                          
ASS       Assemble a library element using the ASS procedure in the same library    
$%E $RZ.SYSPROC(COB85),!NAME                                                        
COB       Compile a file using the DO procedure COB85 in $RZ.SYSPROC                
$%FT ,,,HOSTV11,TEST2,A001,,,,*BS2000,TO,NO                                         
F11       File Transfer to Host V11                                                 
$%EDOR,!NAME                                                                        
EDOR      Process the file with the CFS command EDOR                                
$%DO PROC1,!NAME                                                                    
P1                                                                                  

1234 <11----------------------------------------------------------------------2048>

| |

| ÀÄÄÄ Remarks. These are displayed upon entering the

| Action Codes % or %? .

| If no description has been entered for a mnemonic

| code, then the command pertaining to that mnemonic

| (contents of the header record) will be displayed.

|

|

ÀÄÄ maximum 4 character mnemonic for the Action Codes %act

A further example of a USERACT file can be found in the CFS.S.LMSLIB library.