Example of using the CICSPlex SM API to install a file definition
You can use the CICSPlex® SM API to install a CICS® resource definition either from the CSD or by using BAS.
To simplify the example, only the attributes that relate to the task have been included. For example, the THREAD and RESULT attributes are omitted from CRITERIA, and the LENGTH and PARMLEN values are omitted from PARM.
Installing a file using BAS
This example
shows the installation of a single CICS file
definition, filedef_name, into a CICS System, cics_system_name,
in the CICSplex, cicsplex_name.
CONNECT CONTEXT(cicsplex_name) SCOPE(cicsplex_name) 1
GET OBJECT(FILEDEF)
CRITERIA(NAME=filedef_name AND DEFVER=def_ver.) 2
PERFORM SET ACTION(INSTALL)
PARM(TARGET(cics_system_name) USAGE(LOCAL).) 3 Installing a tailored file using BAS
This
example shows a method of tailoring the installed attributes, including
name, of a single CICS file
definition, filedef_name. This can be used to exploit
the use of template definitions or to provide region specific variations
to attributes. In the example the CICS file
definition, filedef_name, will be installed into
a CICS System, cics_system_name,
in the CICSplex, cicsplex_name, as CICS file, cics_file_name,
and Status, cics_file_status.
CONNECT CONTEXT(cicsplex_name) SCOPE(cicsplex_name) 1
GET OBJECT(FILEDEF)
CRITERIA(NAME=filedef_name AND DEFVER=def_ver.) 2
PERFORM SET ACTION(INSTALL)
PARM(TARGET(cics_system_name) USAGE(LOCAL) 3
OVERRIDE(NAME=cics_file_name,STATUS=cics_file_status)
OVERTYPE)TARGET).) 5
3 The TARGET parameter
specifies the CICS system,
or systems, into which BAS will install the resources.
5 The OVERRIDE parameter
specifies the attribute_name=attribute_new_value
pairings that will be used at install time by the resource. The OVERTYPE parameter
says where the OVERRIDE will be applied.
Installing a file from the CSD
This example
shows the installation of a single CICS file
definition, filedef_name, into a CICS System, cics_system_name,
in the CSD group csd_group_name.
CONNECT CONTEXT(cicsplex_name) SCOPE(cicsplex_name) 1
GET OBJECT(FILEDEF)
SCOPE(cics_system_name) 1
PARM(CSDGROUP(csd_group_name).) 4
CRITERIA(NAME=filedef_name.) 2
PERFORM SET ACTION(CSDINSTALL) 1 The SCOPE value
is not used for BAS installs. For CSD installs the active SCOPE must
be the name of the CICS system
whose CSD the resources are extracted from, and into which definitions
are installed.
2 The DEFVER attribute
specifies the definition version of a resource, this is useful if
you have more than one resource with the same name. If you are installing
a resource using BAS and you have more than one resource with the
same name, you must specify both the resource name and the definition
version. Do not use the DEFVER attribute with resources defined in
the CSD.
3 The TARGET parameter
specifies the CICS system,
or systems, into which BAS will install the resources.
4 The CSDGROUP parameter
specifies that the resource definition objects are to be retrieved
from the CSD associated with the CICS system
in the SCOPE.