Example of using the CICSPlex SM API to delete a CSD group

You can use the CICSPlex® SM API to delete a CSD group from the CSD.

Delete a CSD group

This example shows the deletion of a CSD group, csd_group_name, all the CICS® resource definitions in the group, and all references to the group in CSD lists in the CSD used by the CICS System, cics_system_name.

CONNECT CONTEXT(cicsplex_name)    
        SCOPE(cics_system_name)         1 

GET OBJECT(CSDGROUP)               
    CRITERIA(NAME=csd_group_name.)
          RESULT(result_set_token)

FETCH INTO(csdgroup_record_buffer)
      LENGTH(csdgroup_record_length)
      RESULT(result_set_token)    

REMOVE OBJECT(CSDGROUP)
       FROM(csdgroup_record_buffer)
       LENGTH(csdgroup_record_length)
       PARM(LISTREMOVE.)
                            

 1  The value of the SCOPE parameter for both the GET and REMOVE commands must be the name of the CICS system which is using the CSD.

 2  The LISTREMOVE parameter removes the CSD group from all lists in the CSD. If this parameter is not specified, the CSD group is deleted but references to the group remain in any CSD lists to which it belonged.