Announcing a prototype search list logical name manipulation utility: SLMOD (aka SLDEFINE or LNMMOD) This command has the capability of creating, inserting, or removing one or more elements from a search list. If removing leaves the list empty and the /EMPTY_DELETE qualifier is present, then the logical name will be deleted. I have coded a prototype that implements all of the functionality described below. I am soliciting BETA testers based on the following specification. The code that I've generated includes: SLMOD.FOR ! Main source file (about 1K lines) SLMOD_STRUCTURES.INC ! Include file (common definitions) CLIMSGDEF.INC !(not needed if you have $CLIMSGDEF module in FORSYSDEF.TLB) SLMOD.CLD ! Command Definition file (about 100 lines) SLMOD_LINKABLE.CLD ! Command Definition for linkable module SLMOD_BUILD.COM ! Procedure to build SLMOD SLMOD_KIT.COM ! Procedure to build the distribution kits SLMOD_TEST.COM ! Verification procedure (about 230 lines) SLMOD.SPEC ! This text file SLMOD.HLP ! Help text to create a help library or include in ! your system-wide utility help library SLMOD_UTILS.FOR! Utility procedures /subroutine functions for SLMOD CLI_FRONT_END.FOR ! Front end routines for CLI$ routines so that ! SLMOD can be invoked without doing SET COMMAND MAKEFILE. ! Makefile that should work with Todd Aven's MAKE Please send any comments/suggestions/questions to rlboyd@rock.concert.net SLMOD logical_name equivalence_string(s) Qualifiers: In order to insert, prepend, or append additional values to a search list or to create a search list from scratch, the following qualifier must be specified. /INSERT (Default) The next 2 qualifiers are equivalent. They specify that the elements in the search list that match the listed equivalence string(s) or specified item numbers are to be removed from the search list. In the case of specifying item numbers the equivalence string(s) will not be required. When using the /BEFORE or /AFTER qualifiers, the search list is scanned for the equivalence strings starting with the position in the list specified by the position qualifier used. If the ALL keyword value is supplied, then the entire logical name is deleted from the output table. /DELETE[=ALL] /REMOVE[=ALL] In order to control the insertion or deletion of equivalence strings the following qualifiers provide 3 different forms of control. When inserting /BEFORE without a numeric value tells the utility to insert the equivalence string(s) before the existing list (pre-pend). When /AFTER is used without a numeric value, the new strings are appended to the list. /AFTER=0 is the same as /BEFORE. If /BEFORE=n specifies a number that is greater than the number of items in the translation it is the same as /AFTER. /ITEM may only be used with the /DELETE or /REMOVE qualifier. It picks a specific item or list of items to be deleted by their position in the list without regard for the equivalence strings at those positions. /BEFORE[=position] /AFTER[=position] ! Default /ITEM=position ! only valid with DELETE or REMOVE m-n ! range of positions (list of positions and/or ranges) * ! Equivalent to /DELETE=ALL /LOG tells the utility that it is to send a log message to SYS$OUTPUT to indicate the action performed. /[NO]LOG In the event that a /DELETE or /REMOVE causes the resulting list to be empty, the utility will by default delete the specified logical name. If /NOEMPTY_DELETE is specified, no change will be made to the search list logical name -- it will be left unchanged. /[NO]EMPTY_DELETE The input and output logical name tables may be selected by the use of these qualifiers. Use of the MODE entry for the OUTPUT_TABLE overrides the global qualifiers that specify access mode. There is no default access mode on the INPUT_TABLE, you must specify it if you want to force the translation to that mode. The default for OUTPUT_TABLE is SUPERVISOR mode. If you specify /USER/OUTPUT=(NAME=LNM$JOB) the mode used for the output table definition will be SUPERVISOR since it is defaulted in by specifying the table name. If you specify /USER/JOB the mode used will be USER mode. /INPUT_TABLE=(NAME=lnmtable[,MODE=]) /OUTPUT_TABLE=(NAME=lnmtable[,MODE=]) Using any of the following qualifiers will set both the input and output tables to the same value unless specifically overriden with one of the qualifiers above. /PROCESS ! Default /JOB /GROUP /SYSTEM You may select which access mode you wish to use for accessing the logical name you are affecting. If specified, the selected mode will be used in translating the existing logical name(if any) as well as creating the new definition. If one of these qualifiers is specified it will only apply to the output table, unless explicitly overridden by a MODE entry in the /OUTPUT_TABLE value list. /USER /SUPERVISOR ! Default, applies to output only/ /EXECUTIVE /KERNEL The name attributes for the logical name may be controlled by the use of the the following qualifier. Currently supported keywords are NO_ALIAS and CONFINE. These are identical to the ones supported by the DEFINE command. /NAME_ATTRIBUTES=(attributes allowed by DEFINE) Sometimes it is nice to get the values of a search list logical back in a DCL symbol for other purposes -- not the least of which is debugging! So the following qualifier will help those who need this capability. /SYMBOL=dclsymbol Symbol name to receive a string copy of the old value of the search list Positional qualifier(s) /TRANSLATION_ATTRIBUTES=(translation_keyword(s)) Name attributes apply to the whole search list. The Translation attributes apply to the elements individually. This qualifier may be used at a global level. If used globally, any attribute(s) specified globally will be applied to all elements of the search list except where explicitly overridden. In order to maintain compatibility with the DEFINE command, if the equivalence string is a list of values, the list is inserted or removed as appropriate. A DELETE/REMOVE can do it either by position or equivalence name or deleting the entire logical name. Also, if there would be no elements left in the list and the EMPTY_DELETE is specified it will DEASSIGN the logical name.