!Last Modified:   4-FEB-1994 14:57:14.73, By: RLB14162
!
! HELP Library module SLMOD
!
! Author:	Robert L. Boyd
! Date:		15-Nov-1990
!
! Change History:
!----------------------------------------------------------------------
! 04-Feb-1994	R.L.Boyd	Modified ITEM and  DELETE qualifiers
!				entries to cover new features
!				Added examples
!
! 15-Nov-1990	R.L.Boyd	Initial Version
!----------------------------------------------------------------------
!
1 SLMOD
 Creates a search list, inserts, or  removes 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.
 
 This command is similar to the DEFINE command.  See HELP
 DEFINE for more about defining logical names.

 Format:

  SLMOD	logical_name equivalence_string(s)
2 Parameters
  See HELP DEFINE PARAMETERS for a full description.
3 Logical_Name
  See HELP DEFINE PARAMETERS for a complete description.
3 Equivalence_String(s)
  See HELP DEFINE PARAMETERS for a complete description.
2 Qualifiers
/INSERT (Def)

 This qualifier causes SLMOD to insert, prepend, or append
 additional values to a search list or to create a search
 list from scratch.

 Mutually exclusive with /DELETE or /REMOVE
/DELETE[=ALL]
/REMOVE[=ALL]

 These  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.

 Mutually exclusive with /INSERT.
/BEFORE
/AFTER (Def)
/ITEM

 /BEFORE[=number]
 /AFTER[=number]     (Default, End for INSERT, 0 for DELETE)
 /ITEM=position
       range
       list
       *

 Used to  control the  insertion or  deletion of  equivalence
 strings.    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.

 Only 1 of these 3 qualifiers  may  be  specified.  They  are
 mutually exclusive.

 /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.

  /ITEM can be used in any of the following ways:

  /ITEM=position		! Delete affects only this position
  /ITEM=position1-position2	! Deletes the range specified
  /ITEM=(list,of,positions,or,ranges) ! deletes all of the listed positions
  /ITEM=*			! Deletes the logical name
/INPUT_TABLE
/OUTPUT_TABLE

 /INPUT_TABLE=(NAME=lnmtable[,MODE=<mode keyword>])
 /OUTPUT_TABLE=(NAME=lnmtable[,MODE=<mode mode keyword>])

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.

 NAME
 Specifies the logical name table to be used.

 MODE
 Specifies the access mode to be used when translating or
 creating/updating the logical name.  Valid modes are

  USER, SUPERVISOR, EXECUTIVE, and KERNEL

 If the user specifies EXECUTIVE or KERNEL for the
 OUTPUT_TABLE and doesn't have the necessary privileges,
 the logical name will be created using SUPERVISOR mode.

/PROCESS (Def)
/JOB
/GROUP
/SYSTEM

Using any of these qualifiers will set both the input and
output tables to the same value unless you specifically
override it with the INPUT_TABLE or OUTPUT_TABLE qualifiers.

/USER_MODE
/SUPERVISOR_MODE (Def)
/EXECUTIVE_MODE
/KERNEL_MODE
Used to select which access mode you wish to use to
define/update the logical name.  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.
/NAME_ATTRIBUTES
 /NAME_ATTRIBUTES[=(keyword[,...])]

Controls the name attributes for the logical name. Currently
supported keywords are:  NO_ALIAS and CONFINE.  These are
identical to the ones supported by the DEFINE command.  

See HELP DEFINE /NAME_ATTRIBUTES for more on these keywords.
/TRANSLATION_ATTRIBUTES

 /TRANSLATION_ATTRIBUTES[=(keyword[,...])]
Specifies translation attributes to apply to the equivalence
names. These attributes apply to the elements individually.
This qualifier may be used in a global or positional mode.
If used as a global qualifier any attribute(s) specified
will be applied to all elements of the search list except
where explicitly overridden.

Valid keywords are:   [NO]CONCEAL, NO]TERMINAL

See HELP DEFINE /TRANSLATION_ATTRIBUTES for more on these
keywords.
/LOG

 /LOG
 /NOLOG (Default)

 Tells the utility that it is to send a log message to
 SYS$OUTPUT to indicate the action performed.

/EMPTY_DELETE

 /EMTPY_DELETE (Default)
 /NOEMPTY_DELETE

 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.
/SYMBOL

 /SYMBOL=dcl_symbol_name

Stores in a DCL local symbol a string containing the
equivalence logical name(s), any translation attributes that
apply to them, the access mode, and the name attributes in a format 
that could be used to do an SLMOD or DEFINE command.
2 Examples

 To create a search list in the LNM$JOB logical name table:

 SLMOD MY_LIST/JOB A/TRANSLATION_ATTRIBUTES=(CONCEALED),B,C

 To insert a single value in a list, return the list to a
 symbol, and log the event:

 SLMOD/INSERT MY_LIST/JOB D/BEFORE=2/SYMBOL=MY_LIST_SYMBOL/LOG
 SLMOD/INSERT MY_LIST/JOB D/AFTER=1/SYMBOL=MY_LIST_SYMBOL/LOG

 SHOW SYMBOL MY_LIST_SYMBOL
  MY_LIST_SYMBOL = 
      "A/TRANSLATION_ATTRIBUTES=(CONCEALED),D,B,C/SUPERVISOR_MODE"

 To copy a list from one table to another and delete a
 value from the list:

 SLMOD/DELETE MY_LIST/INPUT_TABLE=(NAME=LNM$JOB)/PROCESS/USER/ITEM=2-3

 To copy a list from one table to another and insert/append a value:

 SLMOD SYS$SYSTEM/INPUT_TABLE=NAME=LNM$SYSTEM -
	SITE_UTILITIES/OUTPUT_TABLE=(NAME=LNM$GROUP,MODE=EXECUTIVE)

 To delete all the elements of a search list except the 1st one:

 SLMOD/DELETE MY_LIST/JOB/ITEM=2-*

 To delete an element matching a particular string after a specific
 position in the list:

 SLMOD/DELETE SYS$SYSTEM/GROUP/EXECUTIVE_MODE/AFTER=2 SITE_UTILITIES

 To delete an entire list:

 SLMOD/DELETE=ALL DECW$USER_TRASH -
	/OUTPUT_TABLE=DECW$LOGICAL_NAMES/MODE=KERNEL
 
 With USER,SUPERVISOR and EXECUTIVE mode logical names you can just
 as easily use the DEASSIGN command.  SLMOD provides you the added
 capability to manipulate KERNEL mode logical names.
