UNDOCUMENTED SWITCHES IN DEC COMMANDS The command definitions reveal some undocumented switches. Many are not documented because they don't work! Some do work and are nice to have. UNDOCUMENTED FEATURES OF CLEDITOR The DEC CLD's use what appear to be undocumented features of CLEDITOR. Be careful, things aren't always what they appear to be! Examples: SYNONYMs may be defined for verbs. R, RU and RUN are synonyms. To use this feature set up the verb definition as DEFINE VERB (SYN1,SYN2,...SYNN) , where SYN1, ... SYNN are the synonyms. The TYPE characteristic is frequently used on qualifiers and parameters. It takes either the name of a KEYWORD list or one of the following predefined values: $INFILE $OUTLOG $OUTFILE $INSYM $NUMBER $OUTSYM $PRIVILEGE $NODE $DATETIME $DEVICE $PROTECT $DIR $PROCESS $UIC $INLOG $REST_OF_LINE Specifying a predefined value causes a bit to be set in a flag in the DCL tables. That's it! For example a specification of TYPE=$UIC does not cause DCL to check that a valid uic was specified as the qualifier or parameter value. KEYWORDs appear to be supported in a limited fashion: . Keywords can only be used on parameters. The apparent use of keywords on qualifiers in the DEC clds means nothing. Keyword processing is done via LIB$LOOKUP_KEY. . If the verb has any qualifiers, the keywords must be the same as the qualifiers. DCL will use the qualifiers as the keyword values regardless of what you list as keywords. . CLI$GET_VALUE always returns the keyword specified as the default value for the parameter. If no default is specified and required is specified, prompting will go on forever! An alternate syntax statement which specifies a different routine or image for each keyword is the only way I found to distinguish which keyword is entered. . The SET command is a good example of the use of keywords. Here is a less complicated example. define syntax TEST_A_SYNTAX image DEV:[DIR]A noparameters qualifier X qualifier Y define syntax TEST_B_SYNTAX image DEV:[DIR]B parameter P1,prompt="Huh?" value (required) qualifier Z define type TEST_P1_KEYS keyword A syntax=TEST_A_SYNTAX keyword B syntax=TEST_B_SYNTAX define verb TEST image DEV:[DIR]TEST parameter P1,PROMPT="What" value (required,type=TEST_P1_KEYS) The example is self-explanatory. You can try it to experiment with syntax checking without building the executables. You know you passed syntax checking if a nonexistent image message is displayed. MODIFICATION OF DEC COMMAND DEFINITIONS Because images and CLDs work hand-in-hand, it is not reasonable to expect to make major CLD changes without making corresponding changes to the associated image(s). For example removing a qualifier is not possible without removing the call to CLI$GET_VALUE from the image. Without source this isn't practical. Another example is the modification of a qualifier keyword list. This doesn't work because the keywords are parsed using internal keyword lists and not the CLD lists. Default values can be changed, added or removed easily. An example of this is the P1 parameter on ANALYZE/CRASH. You can easily change this from a REQUIRED parameter to a parameter with a default of SYS$SYSTEM:SYSDUMP.DMP or to whatever suits your fancy. It is also simple to make a particular qualifier present/absent by default. Qualifiers which have associated syntax statements may be removed or hidden by removing or changing the name of the qualifier. It is not necessary to change the keyword for the qualifier if it is also a parameter keyword because this is not used! Qualifiers which do not have syntax statements are more difficult to remove or hide. Removal may be done by altering the qualifier definition to include a syntax which specifies a user written image which displays the invalid qualifier error message. Hiding these qualifiers can be done by a "passwording". The qualifier is first removed as described above. The selected "password" is then added as a new qualifier specifying a syntax identical to that for the verb, including the old qualifier. When someone enters the hidden qualifier without first entering the "password" qualifier, the invalid qualifier error message is displayed. If the "password" is also entered, the old qualifier is allowed. This is not infallible. Anyone who can run CLEXTRACT (or write something similiar) can determine what the "password" is. EXAMPLES OF DEC COMMAND MODIFICATIONS The verb ASSIGN has a short, simple definition and can be used to illustrate command modifications. The original definition is: define syntax ASSI_QUEUE image QUEMAN define verb ASSI routine assign parameter P1 label=P1 prompt="Device" value (required,type=$INFILE) parameter P2 label=P2 prompt="Log name" value (required,type=$OUTLOG) qualifier SYSTEM qualifier GROUP qualifier PROCESS qualifier USER_MODE qualifier SUPERVISOR_MODE qualifier QUEUE syntax=ASSI_QUEUE qualifier MERGE syntax=ASSI_QUEUE The /QUEUE qualifier can be directly removed, because it has a syntax statement which specifies another image: define syntax ASSI_QUEUE image QUEMAN define verb ASSI routine assign parameter P1 label=P1 prompt="Device" value (required,type=$INFILE) parameter P2 label=P2 prompt="Log name" value (required,type=$OUTLOG) qualifier SYSTEM qualifier GROUP qualifier PROCESS qualifier USER_MODE qualifier SUPERVISOR_MODE qualifier MERGE syntax=ASSI_QUEUE The /PROCESS qualifier removal requires the addition of a syntax statement: define syntax ASSI_BAD image DEV:[DIR]ERROR noparameters noqualifiers define syntax ASSI_QUEUE image QUEMAN define verb ASSI routine assign parameter P1 label=P1 prompt="Device" value (required,type=$INFILE) parameter P2 label=P2 prompt="Log name" value (required,type=$OUTLOG) qualifier SYSTEM qualifier GROUP qualifier PROCESS syntax=ASSI_BAD qualifier USER_MODE qualifier SUPERVISOR_MODE qualifier QUEUE syntax=ASSI_QUEUE qualifier MERGE syntax=ASSI_QUEUE ERROR is a user written program which issues the invalid qualifier keyword error message (IVKEYW). To "password" the /PROCESS qualifier, the "password" qualifier must be added: define syntax ASSI_BAD image DEV:[DIR]ERROR noparameters noqualifiers define syntax ASSI_QUEUE image QUEMAN define syntax ASSI_SECRET qualifier SYSTEM qualifier GROUP qualifier PROCESS qualifier USER_MODE qualifier SUPERVISOR_MODE qualifier QUEUE syntax=ASSI_QUEUE qualifier MERGE syntax=ASSI_QUEUE define verb ASSI routine assign parameter P1 label=P1 prompt="Device" value (required,type=$INFILE) parameter P2 label=P2 prompt="Log name" value (required,type=$OUTLOG) qualifier SYSTEM qualifier GROUP qualifier SECRET syntax=ASSI_SECRET qualifier PROCESS syntax=ASSI_BAD qualifier USER_MODE qualifier SUPERVISOR_MODE qualifier QUEUE syntax=ASSI_QUEUE qualifier MERGE syntax=ASSI_QUEUE There is no need to specify the parameters on the ASSI_SECRET syntax because they are the same as the original verb. After this command defintion is entered in the DCl tables, ASSIGN/PROCESS will fail. ASSIGN/SECRET/PROCESS will work. Note that the /SECRET qualifier must appear on the command line before the /PROCESS qualifier.