The DFHCSDUP ADD command

Add a group to a list.

ADD syntax

Read syntax diagramSkip visual syntax diagramADdGroup (groupname) LIst(listname) After(groupname2)Before(groupname3)

Options

After(groupname2)
specify AFTER to place the new group name after the existing group name. The group name is added at the end of the list if BEFORE or AFTER is not specified.
Before(groupname3)
specify BEFORE to place the new group name before the existing group name. The group name is added at the end of the list if BEFORE or AFTER is not specified.
Group(groupname)
specifies the name of the group to be added. The name must not already exist in the list. A generic group name is not accepted.
LIst(listname)
specifies the name of the list to which the group is to be added. If the list does not already exist, a new one is created. A generic list name is not accepted.

Examples

To create a list LA01, by adding a group to it
ADD GROUP(GA001) LIST(LA01)
To add another group to list LA01, withot specifying where
ADD GROUP(GA002) LIST(LA01)
LA01 now looks like this
  • GA001
  • GA002
To add another group at the beginning of the list
ADD GROUP(GA003) LIST(LA01) BEFORE(GA001)
To add another group between GA001 and GA002
ADD GROUP(GA004) LIST(LA01) AFTER(GA001)
LA01 now looks like this
  • GA003
  • GA001
  • GA004
  • GA002