Specifies a sequence of characters, a function or attention key, or the lightpen, for performing a task such as invoking a script in the same way as the AUTOSEQ parameter, but for a session.
This common session parameter is applicable to these control statements: SYSTEM (see SYSTEM statement), PROFILE (see PROFILE statement), USER (see USER statement), TERMINAL (see TERMINAL statement), and APPL (see APPL statement).
SAUTOSEQ escape [A|C ismcommand|E|I|J|N scriptname]
[PASS REMESC] [NOCURESC]
[ACTIONKEY aidkey] [COMMANDPRFX Y|N|ON|OFF]
[PARM Y|N]
escape, which must be delimited by a null or space if issued, can be from one to eight characters long, PF1-24, PA1-3, ATTN, CLEAR or PEN.
The subparameters A, I, E and N specify the type of script to be run when escape is entered. The subparameters C and J enable other actions to be performed when escape is entered. More information on these subparameters follows:
The AUTOSCRIPT is run, for this session.
Creates a synonym called escape for the supplied valid IBM Session Manager command ismcommand. This synonym may be issued within sessions. The ismcommand can be any IBM Session Manager command the user could enter on the menu, except command scripts. Session selections and session transids can be entered, causing the user's visible session to be switched to the requested session. If the IBM Session Manager command has operands, the entire ismcommand must be enclosed in single quotes, for example:
If the IBM Session Manager command contains a character string normally enclosed in single quotes, the entire ismcommand must be enclosed in double quotes:
"BROADCAST 'Good Morning' ALL"
The ismcommand may contain variables which are substituted before the IBM Session Manager command is invoked:
where &T_USER& is replaced by the user's identity when the IBM Session Manager command is invoked.
If the ismcommand is rejected then the user will receive two broadcasts - firstly message 526, and then the resulting error message.
The ENDSCRIPT is run, for this session.
The scriptname supplied with escape is run.
Defines a character string alias that represents an instruction to jump to an applid. Session numbers can be entered as well as a session's applid. The alias is specified in the escape value, it must be one to eight characters long and has no default value. For example, an alias may be defined as follows:
If an example session had an applid CICSA, the user could jump to the session by entering:
If the destination applid is invalid, message 527 is issued in a IBM Session Manager broadcast sent to the user.
The script specified on the SAUTOSEQ parameter is run.
Passes the complete datastream containing the SAUTOSEQ escape sequence onto the script. Script logic can then be used to determine if the sequence is to be passed onto the application. For example, it can be useful when used with a PCTRANSFER script driven by a SAUTOSEQ escape setting of IND£FILE. The datastream containing the IND£FILE and its parameters can then be passed to the session.
Specifies that the escape sequence should be removed from the terminal screen. If REMESC is not used then the escape sequence will remain displayed on the screen when the user returns to the session. Optionally, the variables ucrestesc, unrestescrow and unrestesccol can, if required, be read by the script and used to reinstate the sequence that has been removed. For further information, see the Panels, Script and Variables manual.
If CURESC YES has been specified (see CURESC), the NOCURESC subparameter allows SAUTOSEQ sequences to be recognized and actioned immediately they are entered in an input field, regardless of the cursor position. This is particularly useful if you are running the supplied script GOPCTRAN, which automatically detects IND£FILE and issues the PCTRANSFER command.
Used to specify an aidkey that will invoke the synonym. aidkey may be any valid aid key PF1-24. If ACTIONKEY is specified then pressing the Enter key will not invoke the SAUTOSEQ escape sequence. If an ACTIONKEY is used, the SAUTOSEQ escape sequence cannot be a function or attention key. If the user tries to define an ACTIONKEY sequence when the escape sequence is a function or attention key, error 4011 is issued.
See also CMDACTIONKEY.
If COMMANDPRFX Y or COMMANDPRFX ON is specified in the statement then a command prefix character is enabled. By default, COMMANDPRFX has a value of N. If a command prefix character is enabled, the actual prefix character to use is specified in the COMMANDPRFXVAL parameter of the USER statement. For example, if a command prefix has been defined in a USER statement:
and the following statement is given:
SAUTOSEQ D C DISCONNECT COMMANDPRFX Y ACTIONKEY PF10
then the user will be able to disconnect from the session by entering /D and pressing PF10.
See also COMMANDPRFXVAL.
If PARM Y is specified in the statement then IBM Session Manager will scan for a parameter of up to eight characters entered after the sequence. If one is found then the variable ucsautoparm will contain the value. The entered parameter will be treated as part of the sequence and so removed with it. This parameter should be used only on SAUTOSEQ definitions that invoke scripts; the variable would normally be accessed in these scripts. By default, PARM has a value of N.
Any number of SAUTOSEQ parameters can be specified for each session. However, since they are session-specific, the scripts can be run only when the session is active.
When evaluating an escape sequence, IBM Session Manager will check the sequences configured by the user in the order they were entered. The first sequence that matches is the one that will be actioned.
It is recommended that escapes driven by a character sequence should appear first, sorted in descending order by sequence length. This means that the longest sequences are at the top of the list. Next, escapes invoked by a function or attention key should appear at the end of the list. This order is particularly important when cursor sensitive escapes are enabled (see CURESC).
For example, consider the following escape definitions:
If the above example definitions are entered in a system where cursor sensitive escapes are active, two problems could occur. If the user types in xx and presses the PF5 key, the aascript will run instead of the xxscript. If the user types in abs and presses the Enter key, the bscript will run instead of the abscript.
The solution is to change the order of the escape definitions:
See also STOPINH and STOP_INHERIT keywords.