Example of using the CICSPlex SM API to install a CICS connection definition

You can use the CICSPlex® SM API to install a CICS® connection definition either from the CSD, or from the CICSPlex SM data repository using BAS.

The installation of CICS connection definitions differs from the installation of other CICS resources in that they must be installed with at least one associated session definition. In BAS the installation of CICS connection definitions is achieved through the use of a Resource Assignment (RASGNDEF). In the CSD installation of CICS connection definitions is achieved by installing the connection and session from a group.

Installing a connection definition using BAS

This example shows the installation of a CICS connection definition, conndef_name, into a CICS System, cics_system_name, in the CICSplex, cicsplex_name.

CONNECT CONTEXT(cicsplex_name) SCOPE(cicsplex_name)

GET OBJECT(CONNDEF)
    CRITERIA(NAME=conndef_name AND DEFVER=def_ver.)) 
    
PERFORM SET ACTION(INSTALL)
        PARM(TARGET(cics_system_name) 
             USAGE(LOCAL)
             REFASSIGN(rasgndef_name).)              1 

Installing a connection definition from the CSD

This example shows the installation of a CICS connection definition, condef_name, defined to the CSD group, csd_group_name, into a CICS System, cics_system_name.

CONNECT CONTEXT(cicsplex_name) SCOPE(cicsplex_name)

GET OBJECT(CSDGROUP)                                 2 
    SCOPE(cics_system_name)
    CRITERIA(NAME=csd_group_name.)
    
PERFORM SET ACTION(CSDINSTALL)                       3 

 1  The REFASSIGN parameter is required for a CONNDEF install. The value is the Resource Assignment (RASGNDEF) that identifies the session definition or definitions in a Resource Group (RESGROUP) to be installed with the connection definition.

 2  One of CSDGROUP, CSDINGRP, CSDINLST, or CSDLIST must be used to install connection definitions from the CSD and must include at least one connection and session pair in the result set being installed.

 3  The CSDINSTALL action does not require any parameters because the OBJECT is a CSD only resource.



CPSMexample2.html | Timestamp icon Last updated: Sunday, 4 June 2017