Alias

Set Alias aliasname To aliasdefinition

Qedit commands have priority over any external commands, such as UDCs and command files. The fact that Qedit commands can be abbreviated to a few characters (e.g., C for Change) and combined with various suffixes (e.g., CQ for Change Quiet) has caused some problems with seemingly different external commands.

The new Set Alias command now allows you to override Qedit’s command priority. Aliases are always executed first. For example, SPJ is the abbreviation for Qedit’s SpellJ (i.e., call the spell checker in Justify mode). If you had a command file or UDC called SPJ, you could get it to execute only by explicitly using the colon prefix (:SPJ).

Using the Alias feature, you can now use

  /Set Alias "spj" to ":spj"  

From that point on, entering SPJ would always call the external command.

The alias name and definition must be enclosed in a string delimiter such as quotes. You must use the same delimiter for both items.

  /Set Alias "SPJ" to ":showout"         {valid}  /Set Alias \SPJ\ to \:showout\         {valid}  /Set Alias "SPJ" to \:showout\         {invalid}  /Set Alias \SPJ\ to ":showout"         {invalid}  

The alias name can have up to 50 characters. It can contain only alphabetic characters. Although the alias should not contain numeric digits, special characters or spaces, the Set command does not currently prevent you from using these characters. If you do use them, the alias feature will not work properly. If you use an alias name that has already been defined, the new definition replaces the old one.

The alias definition can contain up to 77 characters and can include one or more commands. The definition can contain any command that can normally be entered at the Qedit prompt, including other aliases.

You can use Qedit’s command stacking feature to enter a series of commands and create something that resembles a macro command.

  Set Alias "Five" to "First;F 'string';List */*+5"  

The length of all alias names and definitions cannot exceed 2,500 characters.

Stacked commands are separated by a semicolon (;). If you use MPE commands, UDCs and command files, you might have to use semicolons to separate parameters. This will confuse Qedit. There are different ways to work around this problem.

You can put the command in another UDC or command file that does not require parameters.

  /echo listspf o@;seleq=[owner=mgr.acct] > mycmd  /Set Alias "SPJ" To "mycmd"  

You can set an MPE variable with the appropriate information and reference the variable.

  /setvar mycmd "listspf o@;seleq=[owner=mgr.acct]"  /Set Alias "SPJ" To ":/!mycmd"  

The last option is to enclose the command and its parameters in parentheses.

  /Set Alias "SPJ" To "L 1;(listspf o@;seleq=[jobnum=J123]);V"  

If the command itself contains parentheses, you will have to use the variable or command file approach.

More:

Function Key

Ignorecase

Trace

Remove

Reset

Alias