modifydeptgroup

Use the modifydeptgroup command to modify an existing department. You can add and remove members of a department by specifying the member type. For example, a deptgroup type for a department or an appgroup type for an application and the -memberid parameter for the individual member. You can also use a -tagkey and -tagvalue member pair.

Syntax

Read syntax diagramSkip visual syntax diagramtpctoolmodifydeptgroup-user user_name -pwd password -url url -add-remove-id DepartmentGroupID -type deptgroupappgroup -memberid MemberID of the type OR-tagkey udp1 udp2udp3 -tagvalue tagvalue-help-fs character-qs character?-silent-header

Parameters and arguments

-user user_name
Specifies an IBM Spectrum Control user ID.
-pwd password
Specifies the password for the IBM Spectrum Control user ID.
-url url
Specifies the Device server. The format of the URL is system:port_number, where system represents either the host name or IP address, and port_number represents the IBM Spectrum Control Device server port.
-add
Adds a member to the specified department, which is designated by the specified member -type and -memberid or the -tagkey,-tagvalue parameter pair.
-remove
Removes a member from the specified department, which is designated by the specified member -type and -memberid parameters or the -tagkey,-tagvalue parameter pair. Use the lsdeptgroupmembers -id id of the department command to view a list of members and member IDs for a specified department.
-id DepartmentGroupID
Indicates the unique ID of the department where the member is added or removed. Use the lsdeptgroup command, to view a list of the departments that are known to IBM Spectrum Control.
-type deptgroup|appgroup
Denotes the department or application type that needs to be added or removed. This parameter can contain any alphanumeric character, with a maximum of 60 characters in length.
-memberid MemberID of the type
The unique ID of the member being added or removed. Use the lsdeptgroup command, to view a list of the departments that are known to IBM Spectrum Control.
You can specify one of the following key types for this parameter:
deptgroup
The unique name of the department to be added or removed that is specified by the -memberid parameter.
appgroup
The unique name of the application to be added or removed that is specified by the -memberid parameter.
-tagkey udp1 or udp2 or udp3
Specifies the -tagkey parameter that is used to add or remove department members.
-tagvalue tagvalue
Specifies the -tagvalue parameter that is used to add or remove department members.
Note: You can only specify one -tagkey and -tagvalue parameter member pair at a time.
-fs character
Specifies the 7-bit character that separates the information in the output. If you omit this parameter, the information is separated by blank spaces.
-header
Suppresses the column headings in the output. If you omit this parameter, the column headings are included.
-help | -h | -?
Lists help information for the command.
-qs character
Specifies the 7-bit character that surrounds character strings and date stamps in the output. If you omit this parameter, character strings and date stamps are enclosed by double quotation marks (").
-silent
Suppresses all output for the command. If you omit this parameter, output is included.

Example: Adding members to a department

The following example adds the department member that is specified by the -type and -memberid parameters, with /Department/5044 -type deptgroup.

You can add members of a specified department, with the following command:
tpctool
tpctool> modifydeptgroup -id /Department/5041 -add -type deptgroup
-memberid /Department/5044

The following output is returned:

Group Name	   Member ID		          MemberType	    Status
=============================================================================
Accounting	   /Department/5044	        Department	     SUCCESS
You can add an appgroup type to a specified department, with the following command:
tpctool
tpctool> modifydeptgroup -id /Department/5035 -add -type appgroup
-memberid /Application/7024

The following output is returned:

Group Name	   Member ID		          Member Type	      Status
============================================================================
Sales          /Application/7024     Application       SUCCESS

Example: Removing members of a department

The following example removes the department member that is specified by the -type and -memberid parameters.

You can remove members of a specified department with the following command:
tpctool
tpctool> modifydeptgroup -id /Department/5041 -remove -type deptgroup
-memberid /Department/5044

The following output is returned:

Group Name	   Member ID            MemberType	 Status
===========================================================================
Accounting	   /Department/5044	   Department	 SUCCESS
You can remove the appgroup type for a specified department, with the following command:
tpctool
tpctool> modifydeptgroup -id /Department/5035 -remove -type appgroup
-memberid /Application/7024

The following output is returned:

Group Name	  Member ID                 Member Type	         Status
=============================================================================
Sales        /Application/5044                   Application     SUCCESS

Example: Adding department members with tags

The following example adds department members that are specified by the -tagkey and -tagvalue parameters.

You can add members of a specified department with tags using the following command:
tpctool
tpctool> modifydeptgroup -add -id /Department/5041 -type deptgroup -tagkey udp1
-tagvalue value1

The following output is returned:

Group Name      Member ID         Member Type      Status
==========================================================
Accounting     /Department/5044  Department Group  SUCCESS
Accounting     /Department/5035  Department Group  SUCCESS
Accounting     /Department/6044  Department Group  SUCCESS
Accounting     /Department/6035  Department Group  SUCCESS

Example: Removing department members with tags

The following example removes department members that are specified by the -tagkey and -tagvalue parameters.

You can remove members of a specified department with tags using the following command:
tpctool
tpctool> modifydeptgroup -remove -id /Department/5041 -type deptgroup -tagkey udp1
-tagvalue value1

The following output is returned:

Group Name      Member ID         Member Type          Status
===============================================================
Accounting     /Department/5044  Department Group     SUCCESS
Accounting     /Department/5035  Department Group     SUCCESS
Accounting     /Department/6044  Department Group     SUCCESS
Accounting     /Department/6035  Department Group     SUCCESS