Associates an equivalence name with a logical name. You can also: o Define a characteristic name for the system queues (see /CHARACTERISTIC). o Define a form name and number and the characteristics of the physical paper stock for printer and terminal queues (see /FORM). o Associate an equivalence string and a set of attributes with a key on the terminal keyboard (see /KEY). Format DEFINE logical-name equivalence-name[,...]
1 – Parameters
logical-name Specifies the logical name string, which is a character string containing from 1 to 255 characters. The following rules apply: o If the logical name is to be entered into the process or system directory logical name tables (LNM$PROCESS_DIRECTORY, LNM$SYSTEM_DIRECTORY), then the name can only have from 1 to 31 alphanumeric characters, including the dollar sign ($) and underscore (_). If the logical name translates to a logical name table name, any alphabetic characters in the name should all be uppercase. o If you specify a colon (:) at the end of a logical name, the DEFINE command saves the colon as part of the logical name. (This is in contrast to the ASSIGN command, which removes the colon before placing the name in a logical name table.) By default, the logical name is placed in the process logical name table. o If the string contains any characters other than uppercase alphanumerics, the dollar sign, or the underscore character, enclose the string in quotation marks (" "). Use two sets of quotation marks ("" "") to denote actual quotation marks. When you enclose a name in quotation marks, the case of alphabetic characters is preserved. equivalence-name[,...] Specifies a character string containing from 1 to 255 characters. The following rules apply: o If the string contains any characters other than uppercase alphanumerics, the dollar sign, or the underscore character, enclose the string in quotation marks. Use two sets of quotation marks to denote an actual quotation mark. Specifying more than one equivalence name for a logical name creates a search list. A logical name can have a maximum of 128 equivalence names. o When you specify an equivalence name that will be used as a file specification, you must include the punctuation marks (colons, brackets, periods) that would be required if the equivalence name were used directly as a file specification. Therefore, if you specify a device name as an equivalence name, you must terminate the equivalence name with a colon. The DEFINE command allows you to assign multiple equivalence names to a single logical name. For example, you can use the same logical name to access different directories on different disks or to access different files in different directories.
2 – Description
The DEFINE command creates a logical name which represents one or more equivalence names. An equivalence name can be a device name, another logical name, a file specification, or any other string. The use of a logical name can be limited to a process, a job, or a group, or it can be used by an entire system or an entire OpenVMS Cluster system. It depends on the table in which the logical name is created, which you specify with one of the following qualifiers: /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE. These first four qualifiers represent the process, job, group, or system logical name tables, respectively, whereas the /TABLE qualifier is used to specify any type of table. Furthermore, the /TABLE qualifier is the only one to use when specifying a clusterwide logical name table. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted. If you do not specify a table with one of these qualifiers, the logical name is added to your process logical name table. To specify the access mode of the logical name you are creating, use the /USER_MODE, the /SUPERVISOR_MODE, or the /EXECUTIVE_MODE qualifier. If you enter more than one of these qualifiers, only the last one entered is accepted. If you do not specify an access mode, a supervisor-mode name is created. You can create a logical name in the same mode as the table in which you are placing the name, or in an outer mode. (User mode is the outermost mode; executive mode is the innermost mode.)
3 – Qualifiers
3.1 /CLUSTER_SYSTEM
You must be signed in to the SYSTEM account or have SYSNAM (system logical name) or SYSPRV (system) privilege to use this qualifier. Defines a clusterwide logical name in the LNM$SYSCLUSTER table.
3.2 /EXECUTIVE_MODE
Requires SYSNAM (system logical name) privilege to create an executive-mode logical name. Creates an executive-mode logical name in the specified table. If you specify the /EXECUTIVE_MODE qualifier and you do not have SYSNAM privilege, the DEFINE command ignores the qualifier and creates a supervisor-mode logical name. The mode of the logical name must be the same or less privileged than the mode of the table in which you are placing the name.
3.3 /GROUP
Requires GRPNAM (group logical name) or SYSNAM (system logical name) privilege to place a name in the group logical name table. Places the logical name in the group logical name table. Other users who have the same group number in their user identification codes (UICs) can access the logical name. The /GROUP qualifier is synonymous with the /TABLE=LNM$GROUP qualifier. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted.
3.4 /JOB
Places the logical name in the jobwide logical name table. All processes in the same job tree as the process that created the logical name can access the logical name. The /JOB qualifier is synonymous with the /TABLE=LNM$JOB qualifier. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted.
3.5 /LOG
/LOG (default) /NOLOG Displays a message when a new logical name supersedes an existing name.
3.6 /NAME_ATTRIBUTES
/NAME_ATTRIBUTES[=(keyword[,...])] Specifies attributes for a logical name. By default, no attributes are set. Possible keywords are as follows: CONFINE The logical name is not copied into a spawned subprocess. This qualifier is relevant only for logical names in a private table. The logical name inherits the CONFINE attribute from the logical name table where it is entered; if the logical name table is "confined," then all names in the table are "confined." NO_ALIAS A logical name cannot be duplicated in the specified table in a less privileged access mode; any previously created identical names in an outer (less privileged) access mode within the specified table are deleted. If you specify only one keyword, you can omit the parentheses. Only the attributes you specify are set.
3.7 /PROCESS
/PROCESS (default) Places the logical name in the process logical name table. The /PROCESS qualifier is synonymous with the /TABLE=LNM$PROCESS qualifier. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted.
3.8 /SUPERVISOR_MODE
/SUPERVISOR_MODE (default) Creates a supervisor-mode logical name in the specified table. The mode of the logical name must be the same as or less privileged than the mode of the table in which you are placing the name.
3.9 /SYSTEM
Requires write (W) access or SYSNAM (system logical name) privilege to place a name in the system logical name table. Places the logical name in the system logical name table. All system users can access the logical name. The /SYSTEM qualifier is synonymous with the /TABLE=LNM$SYSTEM qualifier. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted.
3.10 /TABLE
/TABLE=name Requires write (W) access to the table to specify the name of a shareable logical name table. Specifies the name of the logical name table in which the logical name is to be entered. You can use the /TABLE qualifier to specify a user-defined logical name table (created with the CREATE/NAME_TABLE command); to specify the process, job, group, system, or clusterwide logical name tables; or to specify the process or system logical name directory tables. If you specify the table name using a logical name that has more than one translation, the logical name is placed in the first table found. For example, if you specify DEFINE/TABLE=LNM$FILE_ DEV and LNM$FILE_DEV is equated to LNM$PROCESS, LNM$JOB, LNM$GROUP, and LNM$SYSTEM, then the logical name is placed in LNM$PROCESS. The default is the /TABLE=LNM$PROCESS qualifier. If you enter more than one of the qualifiers /PROCESS, /JOB, /GROUP, /SYSTEM, or /TABLE, only the last one entered is accepted.
3.11 /TRANSLATION_ATTRIBUTES
/TRANSLATION_ATTRIBUTES[=(keyword[,...])] Equivalence-name qualifier. Specifies one or more attributes that modify an equivalence string of the logical name. Possible keywords are as follows: CONCEALED Indicates that the equivalence string is the name of a concealed device. When a concealed device name is defined, the system displays the logical name, rather than the equivalence string, in messages that refer to the device. TERMINAL Logical name translation should terminate with the current equivalence string; indicates that the equivalence string should not be translated iteratively. If you specify only one keyword, you can omit the parentheses. Only the attributes you specify are set. Note that different equivalence strings of a logical name can have different translation attributes.
3.12 /USER_MODE
Creates a user-mode logical name in the specified table. User-mode logical names created within the process logical name tables are used for the execution of a single image; for example, you can create a user-mode logical name to allow an image executing in a command procedure to redefine SYS$INPUT. User-mode entries are deleted from the process logical name table when any image executing in the process exits (that is, after a DCL command or user program that executes an image completes execution). Also, user-mode logical names are automatically deleted when invoking and exiting a command procedure.
4 – Examples
1.$ DEFINE/USER_MODE TM1 $DISK1:[ACCOUNTS.MEMOS]WATER.TXT In this example, the DEFINE command defines TM1 as equivalent to a file specification. After the next image runs, the logical name TM1 is automatically deassigned. 2.$ DEFINE CHARLIE XXX1:[CHARLES] $ PRINT CHARLIE:TEST.DAT Job 274 entered on queue SYS$PRINT In this example, the DEFINE command associates the logical name CHARLIE with the directory name [CHARLES] on the disk XXX1. The PRINT command queues a copy of the file XXX1:[CHARLES]TEST.DAT to the system printer. 3.$ DEFINE PROCESS_NAME LIBRA $ RUN WAKE In this example, the DEFINE command places the logical name PROCESS_NAME in the process logical name table with an equivalence name of LIBRA. The logical name is created in supervisor mode. The program WAKE translates the logical name PROCESS_NAME to perform some special action on the process named LIBRA. 4.$ DEFINE TEMP: XXX1: . . . $ DEASSIGN TEMP:: In this example, the DEFINE command creates an equivalence name for the logical name TEMP: and places the name in the process logical name table. The colon is retained as part of the logical name. The DEASSIGN command deletes the logical name. Note that two colons are required on the logical name in the DEASSIGN command. One colon is deleted by the DEASSIGN command. The other colon is kept as part of the logical name. 5.$ DEFINE PORTLAND PRTLND::YYY0:[DECNET.DEMO.COM] In this example, the DEFINE command places the logical name PORTLAND in the process logical name table with an equivalence name of PRTLND::YYY0:[DECNET.DEMO.COM]. Subsequent references to the logical name PORTLAND result in the correspondence between the logical name PORTLAND and the node, disk, and subdirectory specified. 6.$ DEFINE LOCAL "BOSTON""JAY_SABLE JKS""::" In this example, the DEFINE command places the logical name LOCAL in the process logical name table with a remote node equivalence name of BOSTON"JAY_SABLE JKS"::. To satisfy conventions for local DCL command string processing, you must use three sets of quotation marks. The quotation marks ensure that access control information is enclosed in one set of quotation marks in the equivalence name. 7.$ DEFINE MYDISK XXX0:[MYDIR], YYY0:[TESTDIR] In this example, the DEFINE command places the logical name MYDISK in the process logical name table with two equivalence names: XXX0:[MYDIR] and YYY0:[TESTDIR]. 8.$ DEFINE/TABLE=LNM$CLUSTER_TABLE FIRENZE FIRENZE::FIESOLE:[ETRUSCAN] In this example, the DEFINE command equates FIRENZE to the directory specification FIRENZE::FIESOLE:[ETRUSCAN] and places both the new logical name (FIRENZE) and its equivalence string (FIRENZE::FIESOLE:[ETRUSCAN]) in the default clusterwide table. The new logical name is automatically propagated to all nodes in the cluster. 9.$ CREATE/NAME_TABLE TABLE1 $ DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV - _$ TABLE1,LNM$PROCESS,LNM$JOB,LNM$GROUP,LNM$SYSTEM $ DEFINE/TABLE=TABLE1 - _$ /TRANSLATION_ATTRIBUTES=CONCEALED WORK_DISK DKA1: In this example, the CREATE/NAME_TABLE command creates the process private logical name table TABLE1. The first DEFINE command ensures that TABLE1 is searched first in any logical name translation of a device or file specification (because TABLE1 is the first item in the equivalence string for the logical name LNM$FILE_DEV, which determines the default search sequence of logical name tables whenever a device or file specification is translated). The second DEFINE command assigns the logical name WORK_DISK to the physical device DKA1 and places the name in TABLE1. The logical name has the concealed attribute. Therefore, the logical name WORK_DISK is displayed in system messages. 10$ CREATE/NAME_TABLE SPECIAL $ DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV - _$ SPECIAL,LNM$PROCESS,LNM$JOB,LNM$GROUP,LNM$SYSTEM $ DEFINE/TABLE=LNM$PROCESS_DIRECTORY TAB SPECIAL $ DEFINE/TABLE=TAB REPORT [CHELSEA]STORES $ SHOW LOGICAL/TABLE=SPECIAL REPORT "REPORT" = "[CHELSEA]STORES" (SPECIAL) In this example, the CREATE/NAME_TABLE command is used to create a new logical name table called SPECIAL. This table is defined in the process directory, LNM$PROCESS_DIRECTORY. The first DEFINE command ensures that SPECIAL is searched first in any logical name translation of a device or file specification (because SPECIAL is the first item in the equivalence string for the logical name LNM$FILE_DEV, which determines the default search sequence of logical name tables whenever a device or file specification is translated). The logical name LNM$FILE_DEV is placed in the process directory, LNM$PROCESS_DIRECTORY. With the next DEFINE command, a new logical name, TAB, is defined. TAB translates to the string SPECIAL, which identifies a logical name table. You must define TAB in the process directory because it translates iteratively to a logical name table. Next, the logical name REPORT is placed into the logical name table TAB. Because TAB translates to the table SPECIAL, the name REPORT is entered into SPECIAL table. The SHOW LOGICAL command verifies that the name REPORT has been entered into the table SPECIAL. Note that you can redefine TAB so it translates to a different table. Therefore, if you run different programs that use the name TAB as a table name, you can change the actual tables where the names are entered or referenced.
5 /CHARACTERISTIC
Assigns a numeric value to a queue characteristic. The /CHARACTERISTIC qualifier is required. If a value has been assigned to the characteristic, you must delete and redefine the characteristic to alter the assignment of the existing characteristic. Requires OPER (operator) privilege. NOTE You cannot define more than one characteristic name to a number. Format DEFINE/CHARACTERISTIC characteristic-name characteristic-number
5.1 – Parameters
characteristic-name Assigns a name to the characteristic being defined. The characteristic name can be the name of an existing characteristic or a string of 1 to 31 characters that defines a new characteristic. The character string can include any uppercase and lowercase letters, digits, the dollar sign ($), and the underscore (_), and must include at least one alphabetic character. Only one characteristic name can be defined to each number. characteristic-number Assigns a number in the range 0 to 127 to the characteristic being defined.
5.2 – Example
$ DEFINE/CHARACTERISTIC REDINK 3 The DEFINE/CHARACTERISTIC command in this example defines the characteristic REDINK with the number 3. When a user enters the command PRINT/CHARACTERISTICS=REDINK (or PRINT /CHARACTERISTICS=3), the job is printed only if the printer queue has been established with the REDINK or 3 characteristic.
6 /FORM
Assigns a numeric value and attributes to a print form name. The /FORM qualifier is required. To modify a form's name or number, you must delete and redefine the form. Values for any DEFINE/FORM qualifier can be modified by reentering the DEFINE/FORM command with different values, as long as the form name and number remain the same. Requires OPER (operator) privilege. Format DEFINE/FORM form-name form-number
6.1 – Parameters
form-name Assigns a name to the form being defined. The form name can be the name of an existing form type or a string of 1 to 31 characters that defines a new form type. The character string can include any uppercase and lowercase letters, digits, the dollar sign ($), and the underscore (_), and must include at least one alphabetic character. form-number Assigns a number in the range 0 to 9999 to the form being defined. The DEFAULT form, which is defined automatically when the system is bootstrapped, is assigned number zero.
6.2 – Qualifiers
6.2.1 /DESCRIPTION
/DESCRIPTION=string A string of up to 255 characters used to provide operator information about the form. The default string is the specified form name. The string can be used to define the form type more specifically. For example, if you have form names such as LETTER1, LETTER2, and LETTER3, the /DESCRIPTION qualifier could be used to let the users and operators know that LETTER1 refers to the standard corporate letterhead paper (8.5 inches x 11 inches), LETTER2 refers to the smaller corporate letterhead paper (6 inches x 9 inches), and LETTER3 refers to the president's personalized letterhead paper. Enclose strings containing lowercase letters, blanks, or other nonalphanumeric characters (including spaces) in quotation marks (" ").
6.2.2 /LENGTH
/LENGTH=n Specifies the physical length of a form page in lines. The default page length is 66 lines, which assumes a standard page length of 11 inches with 6 lines of print per inch. The parameter n must be a positive integer greater than zero and not more than 255. The print symbiont sets the page length of the device equal to the form length. This enables the driver to compute the number of line feeds for devices lacking mechanical form feed.
6.2.3 /MARGIN
/MARGIN=(option[,...]) Specifies one or more of the four margin options: BOTTOM, LEFT, RIGHT, and TOP. BOTTOM=n Specifies the number of blank lines between the end of the print image area and the end of the physical page; the value of n must be between 0 and the value of the /LENGTH qualifier. The default value is 6, which generally means a 1-inch bottom margin. LEFT=n Specifies the number of blank columns between the leftmost printing position and the print image area; the value of n must be between 0 and the value of the /WIDTH qualifier. The default is 0, which means that the print image area starts as far to the left of the paper as the printer can go. RIGHT=n Specifies the number of blank columns between the /WIDTH qualifier and the image area; the value of n must be between 0 and the value of the /WIDTH qualifier. When determining the value of the RIGHT option, start at the /WIDTH value and count to the left. The default value is 0, which means that the print image extends as far to the right as the /WIDTH value. TOP=n Specifies the number of blank lines between the top of the physical page and the top of the print image; the value of n must be between 0 and the value of the /LENGTH qualifier. The default value is 0, which generally means that there is no top margin.
6.2.4 /PAGE_SETUP
/PAGE_SETUP=(module[,...]) /NOPAGE_SETUP (default) Specifies one or more modules that set up the device at the start of each page. The modules are located in the device control library. While the form is mounted, the system extracts the specified module and copies it to the printer before each page is printed.
6.2.5 /SETUP
/SETUP=(module[,...]) Specifies one or more modules that set up the device at the start of each file. The modules are located in the device control library. While the form is mounted, the system extracts the specified module and copies it to the printer before each file is printed. For more information on device control modules, see the chapter on Batch and Print Operations in the VSI OpenVMS System Manager's Manual.
6.2.6 /SHEET_FEED
/SHEET_FEED /NOSHEET_FEED (default) Specifies that print jobs pause at the end of every physical page so that a new sheet of paper can be inserted.
6.2.7 /STOCK
/STOCK=string Specifies the type of paper stock to be associated with the form. The string parameter can be a string of 1 to 31 characters, including the dollar sign, underscore, and all alphanumeric characters. If you specify the /STOCK qualifier, you must specify the name of the stock to be associated with the form. If you do not specify the /STOCK qualifier, the name of the stock will be the same as the name of the form. You can create any string that you want; however, when you are creating forms with the same stock, be sure that the /STOCK string is identical in all the DEFINE/FORM commands that refer to the same type of paper. If you are defining a number of forms to provide different formatting options, specify the same stock type for each form. Jobs that request any of these forms will print on the same queue. If you want to modify the stock string associated with a form, you can do this only if the form is not referenced by any job or queue.
6.2.8 /TRUNCATE
/TRUNCATE (default) /NOTRUNCATE Discards any characters that exceed the current line length (specified by the /WIDTH and /MARGIN=RIGHT qualifiers). The /TRUNCATE qualifier is incompatible with the /WRAP qualifier. If you specify both the /NOTRUNCATE and /NOWRAP qualifiers, the printer prints as many characters on a line as possible. This combination of qualifiers is useful for some types of graphics output.
6.2.9 /WIDTH
/WIDTH=n Specifies the physical width of the paper in terms of columns or character positions. The parameter n must be an integer from 0 to 65,535; the default value is 132. Any lines exceeding this value wrap if the /WRAP qualifier is in effect or are truncated if the /TRUNCATE qualifier is in effect. (If both the /NOTRUNCATE and /NOWRAP qualifiers are in effect, lines print as far as possible.) The /MARGIN=RIGHT qualifier overrides the /WIDTH qualifier when determining when to wrap lines of text.
6.2.10 /WRAP
/WRAP /NOWRAP (default) Causes lines that exceed the current line length (specified by the /WIDTH and /MARGIN=RIGHT qualifiers) to wrap onto the next line. The /WRAP qualifier is incompatible with the /TRUNCATE qualifier. If you specify both the /NOWRAP and /NOTRUNCATE qualifiers, the printer prints as many characters on a line as possible. This combination of qualifiers is useful for some types of graphics output.
6.3 – Example
$ DEFINE/FORM /MARGIN=(TOP=6,LEFT=10) CENTER 3 The DEFINE/FORM command in this example defines the form CENTER to have a top margin of 6 and a left margin of 10. The defaults remain in effect for both bottom margin (6) and right margin (0). The form is assigned the number 3.
7 /KEY
Associates an equivalence string and a set of attributes with a key on the terminal keyboard. Format DEFINE/KEY key-name equivalence-string
7.1 – Parameters
key-name Specifies the name of the key that you are defining. All definable keys on VT52 terminals are located on the numeric keypad. On VT100-series terminals, you can define the left and right arrow keys as well as all the keys on the numeric keypad. On terminals with LK201 keyboards, the following three types of keys can be defined: o Keys on the numeric keypad o Keys on the editing keypad (except the up and down arrow keys) o Keys on the function key row across the top of the keyboard (except keys F1 to F5) The following table lists the key names in column one. The remaining three columns indicate the key designations on the keyboards of the three different types of terminals that allow key definitions. Key Name LK201 VT100-Series VT52 PF1 PF1 PF1 [blue] PF2 PF2 PF2 [red] PF3 PF3 PF3 [gray] PF4 PF4 PF4 - - KP0, KP1, ..., KP9 0, 1, ..., 9 0, 1, ..., 9 0, 1, ..., 9 Period . . . Comma , , n/a Minus - - n/a Enter Enter ENTER ENTER Left < - < - < - Right - > - > - > Find (E1) Find - - Insert Here (E2) Insert Here - - Remove (E3) Remove - - Select (E4) Select - - Prev Screen (E5) Prev Screen - - Next Screen (E6) Next Screen - - Help Help - - Do Do - - F6, F7, ..., F20 F6, F7, ..., F20 - - Some definable keys are enabled for definition all the time. Others, including KP0 to KP9, Period, Comma, and Minus, must be enabled for definition purposes. You must enter either the SET TERMINAL/APPLICATION or the SET TERMINAL/NONUMERIC command before using these keys. On LK201 keyboards, you cannot define the up and down arrow keys or function keys F1 to F5. The left and right arrow keys and the F6 to F14 keys are reserved for command line editing. You must enter the SET TERMINAL/NOLINE_EDITING command before defining these keys. You can also press Ctrl/V to enable keys F7 to F14. Note that Ctrl/V will not enable the F6 key. equivalence-string Specifies the character string to be processed when you press the key. Enclose the string in quotation marks (" ") to preserve spaces and lowercase characters.
7.2 – Qualifiers
7.2.1 /ECHO
/ECHO (default) /NOECHO Displays the equivalence string on your screen after the key has been pressed. You cannot use the /NOECHO qualifier with the /NOTERMINATE qualifier.
7.2.2 /ERASE
/ERASE /NOERASE (default) Determines whether the current line is erased before the key translation is inserted.
7.2.3 /IF_STATE
/IF_STATE=(state-name,...) /NOIF_STATE Specifies a list of one or more states, one of which must be in effect for the key definition to work. The /NOIF_STATE qualifier has the same meaning as /IF_STATE=current_state. The state name is an alphanumeric string. States are established with the /SET_ STATE qualifier or the SET KEY command. If you specify only one state name, you can omit the parentheses. By including several state names, you can define a key to have the same function in all the specified states.
7.2.4 /LOCK_STATE
/LOCK_STATE /NOLOCK_STATE (default) Specifies that the state set by the /SET_STATE qualifier remain in effect until explicitly changed. (By default, the /SET_STATE qualifier is in effect only for the next definable key you press or the next read-terminating character that you type.) This qualifier can be specified only with the /SET_STATE qualifier.
7.2.5 /LOG
/LOG (default) /NOLOG Displays a message indicating that the key definition has been successfully created.
7.2.6 /SET_STATE
/SET_STATE=state-name /NOSET_STATE (default) Causes the specified state-name to be set when the key is pressed. (By default, the current locked state is reset when the key is pressed.) If you have not included this qualifier with a key definition, you can use the SET KEY command to change the current state. The state name can be any alphanumeric string; specify the state as a character string enclosed in quotation marks.
7.2.7 /TERMINATE
/TERMINATE /NOTERMINATE (default) Specifies whether the current equivalence string is to be processed immediately when the key is pressed (equivalent to entering the string and pressing Return). By default, you can press other keys before the definition is processed. This allows you to create key definitions that insert text into command lines, after prompts, or into other text that you are entering.
7.3 – Examples
1.$ DEFINE/KEY PF3 "SHOW TIME" /TERMINATE %DCL-I-DEFKEY, DEFAULT key PF3 has been defined $ <PF3> $ SHOW TIME 14-DEC-2001 14:43:59 In this example, the DEFINE/KEY command defines the PF3 key on the keypad to perform the SHOW TIME command. DEFAULT refers to the default state. 2.$ DEFINE/KEY PF1 "SHOW " /SET_STATE=GOLD/NOTERMINATE/ECHO %DCL-I-DEFKEY, DEFAULT key PF1 has been defined $ DEFINE/KEY PF1 " DEFAULT" /TERMINATE/IF_STATE=GOLD/ECHO %DCL-I-DEFKEY, GOLD key PF1 has been defined $ <PF1> $ <PF1> $ SHOW DEFAULT DISK1:[JOHN.TEST] In this example, the first DEFINE/KEY command defines the PF1 key to be the string SHOW. The state is set to GOLD for the subsequent key. The /NOTERMINATE qualifier instructs the system not to process the string when the key is pressed. The second DEFINE/KEY command defines the use of the PF1 key when the keypad is in the GOLD state. When the keypad is in the GOLD state, pressing PF1 causes the current read to be terminated. If you press the PF1 key twice, the system displays and processes the SHOW DEFAULT command. The word DEFAULT in the second line of the example indicates that the PF1 key has been defined in the default state. Note the space before the word DEFAULT in the second DEFINE/KEY command. If the space is omitted, the system fails to recognize DEFAULT as the keyword for the SHOW command. 3.$ SET KEY/STATE=ONE %DCL-I-SETKEY, keypad state has been set to ONE $ DEFINE/KEY PF1 "ONE" %DCL-I-DEFKEY, ONE key PF1 has been defined $ DEFINE/KEY/IF_STATE=ONE PF1 "ONE" %DCL-I-DEFKEY, ONE key PF1 has been defined This example shows two ways to define the PF1 key to be "ONE" for state ONE. The second DEFINE/KEY command shows the preferred method for defining keys. This method eliminates the possibility of error by specifying the state in the same command as the key definition.