Creating a CICS service for C or top-down
If you cannot use the z/OS® Connect API toolkit to create your CICS® service because, for example, you have a C program, your source of input is JSON schema, or you do not have access to the z/OS Connect API toolkit, you can manually prepare the required properties file that the build toolkit needs to generate the service archive.
zosConnect-2.0 Applies to zosConnect-2.0.
The service archive created by the build toolkit can be deployed by copying it to the services directory.
| Property | Importance | Description |
|---|---|---|
| provider | Required | Must be set to cics to build a service archive for the CICS service provider. |
| name | Required | The name of the service. |
| version | Required | The version of the service. |
| description | Optional | A description of the service. |
| connectionRef | Required | The id of the zosconnect_cicsIpicConnection element that defines the connection to CICS. See Notes
1 and 2. |
| language | Required | The language of the CICS program. Valid values are COBOL|C|CPP|PLI-ENTERPRISE|PLI-OTHER. |
| program | Required | The CICS program to invoke. |
| programInterface | Required | The program interface for the CICS program. Valid values are COMMAREA|CHANNEL. This value must be set to CHANNEL to use context containers. See Table 4. |
| ccsid | Optional | Specifies the CCSID that is used at run time to encode character data in COMMAREA and BIT container application data structures. The default is 037 (EBCDIC). |
| characterVarying | Optional | Specifies how character fields in the language structure are mapped. A character field in
COBOL is a Picture clause of type X, for example PIC(X) 10; a character field in
C/C++ is a character array. You can select these options:
|
| dataScreening | Optional | Specifies whether application supplied data is screened for errors. The default is
ENABLED.
|
| dataTruncation | Optional | Specifies if variable length data is tolerated in a fixed-length field structure. The default
is DISABLED.
|
| languageStructureCodePage | Optional | Specifies the Java™ character set name for the source
language structures specified by requestStructure,
responseStructure or referenced from a channel description document. For example,
for IBM® Latin-1 EBCDIC, the value is IBM037. When this property
is used both the requestStructure and responseStructure must name
members in the same partitioned dataset. |
| structure | Optional | Specifies the names of the high-level language structures that are contained in the file or partitioned data set members that are specified in the requestStructure and responseStructure, or generatedRequestStructure and generatedResponseStructure properties. This property is valid only for C and C++ languages. The value of this parameter has the format (request,response). For example the value (ReqStruct,RespStruct) would specify a request structure named ReqStruct in the file or PDS specified by requestStructure and a response structure named RespStruct in the file or PDS specified by responseStructure. The default request structure name is DFHREQUEST and the default response structure name is DFHRESPONSE. |
| transid | Optional | A CICS transaction name. This property will override
the transid set on the connection for this service. Additionally this property can
be set on the service element. The usage of this property varies depending on the
type of connection to CICS and the
transidUsage property. For more information, see zosconnect_cicsIpicConnection and Sub elements. See Note 3. |
| transidUsage | Optional | Specifies how the transid property value is used. This property only
applies to CICS IPIC connections and will override the
transidUsage set on the zosconnect_cicsIpicConnection for this
service. Additionally this property can be set on the service element. For more
information, see zosconnect_cicsIpicConnection
and Sub elements.
|
| useContextContainers | Optional | Valid values are true or false:
useContextContainers can only be used when programInterface is set to CHANNEL For more information, see Context containers. |
| httpHeaders | Optional | A comma-separated list of header names to include in the BAQHTTPHEADERS
context container if they are present on the HTTP request. For example,
httpHeaders=MyHeader,SecondHeader.httpHeaders can only be used when useContextContainers is set to true. |
| Property | Importance | Description |
|---|---|---|
| requestStructure | Required | Specifies the relative or absolute path to the file containing the language structure for the request, or the channel description document file describing the request channel. See notes 4, 5, and 7. |
| responseStructure | Required | Specifies the relative or absolute path to the file containing the language structure for the response or the channel description document file describing the response channel. See notes 4, 5, and 7. |
| characterOccurs | Optional | Specifies how character arrays in the language structure are mapped. For example, PIC
X OCCURS 20 . This property is only for use by COBOL language. The default is
STRING.
|
| characterUsage | Optional | In COBOL, the national data type, PIC N, can be used for UTF-16 or DBCS
data. This setting is controlled by the NSYMBOL compiler option. You must set the
characterUsage property on the build toolkit to the same value as the NSYMBOL compiler option to ensure that the data is handled
appropriately. This is typically set to characterUsage=NATIONAL when you use
UTF-16.
|
| dateTime | Optional | Specifies if potential ABSTIME fields in the high-level language structure are mapped as
timestamps.
|
| truncateNullArrays | Optional | Specifies how structured arrays are processed.
|
| truncateNullArrayValues | Optional | Specifies which values are treated as empty for truncateNullArrays
processing. If all of the bytes of storage within a record of a structured array contain nulls then
the entire record is considered to be empty. One or more of the NULL,
SPACE and ZERO values can be specified in a comma separated list.
Any matching combination of the selected bytes within a structured array record will cause the
entire record to be identified as empty. If truncateNullArrayValues has a value
defined, then truncateNullArrays must be ENABLED.
|
| Property | Importance | Description |
|---|---|---|
| requestSchema | Required | Specifies the relative or absolute path to the JSON schema for the request. See notes 5 and 6. |
| responseSchema | Required | Specifies the relative or absolute path to the JSON schema for the response. See notes 5 and 6. |
| generatedRequestStructure | Required | Specifies the relative or absolute path to the file or PDS that contains the high-level language structures for the request that is generated from the JSON schema. See notes 4 and 5. |
| generatedResponseStructure | Required | Specifies the relative or absolute path to the file or PDS that contains the high-level language structures for the response that is generated from the JSON schema. See notes 4 and 5. |
| characterMultiplier | Optional | Specifies the number of bytes to allow for each character. The value of this property can be a positive integer in the range of 1 - 2147483647. All nonnumeric character-based mappings, are subject to this multiplier. Binary, numeric, zoned, and packed decimal fields are not subject to this multiplier. This property can be useful if, for example, you are planning to use DBCS characters where you might opt for a multiplier of 3 to allow space for potential shift-out and shift-in characters around every double-byte character at run time. When you set ccsid=1200 (indicating UTF-16), the only valid values for characterMultiplier are 2 or 4. When you use UTF-16, the default value is 2. Use characterMultiplier=2 when you expect application data to contain characters that require 1 UTF-16 encoding unit. Use characterMultiplier=4 when you expect application data to contain characters that require 2 UTF-16 encoding units. Note: Setting characterMultiplier to 1 does not preclude the use of DBCS
characters, and setting it to 2 does not preclude the use of UTF-16 surrogate pairs. However, if wide
characters are routinely used then some valid values will not fit into the allocated field. If a larger
characterMultiplier value is used, it can be possible to store more characters in
the allocated field than are valid in the JSON. Care must be taken to conform to the appropriate range
restrictions.
The default is 1. Messages with the DFH prefix might refer to this property as CHAR-MULTIPLIER. |
| characterVaryingLimit | Optional | Specifies the maximum size of binary data and variable-length character data that is mapped to the language structure. If the character or binary data is larger than the value specified in this property, it is mapped to a container and the container name is used in the generated language structure. The value can range from 0 to the default 32767 bytes. |
| characterWhitespace | Optional | Specifies how white space in values of type string is handled by z/OS Connect.
|
| dateTime | Optional | Specifies how JSON date-time format properties are mapped to the language structure.
|
| defaultCharacterMaxLength | Optional | Specifies the default array length of character data in characters for mappings where no length is implied in the JSON schema. The value of this property can be a positive integer in the range of 1 - 2147483647. The default is 255. |
| inlineMaxOccursLimit | Optional |
Specifies whether inline variable repeating content is used based on the maxItems JSON schema keyword. Variably repeating content that is mapped inline is placed in the current container with the rest of the generated language structure. The variably repeating content is stored in two parts, as a counter that stores the number of occurrences of the data and as an array that stores each occurrence of the data. The alternative mapping for variably repeating content is container-based mapping, which stores the number of occurrences of the data and the name of the container where the data is placed. Storing the data in a separate container has performance implications that might make inline mapping preferable. The value of inlineMaxOccursLimit can be a positive integer in the range of 0 - 32767. A value of 0 indicates that inline mapping is not used. A value of 1 ensures that optional elements are mapped inline. If the value of the maxOccurs property is greater than the value of inlineMaxOccursLimit, container-based mapping is used; otherwise inline mapping is used. When deciding whether you want variably repeating lists to be mapped inline, consider the length of a single item of recurring data. If few instances of long length occur, container-based mapping is preferable; if many instances of short length occur, inline mapping is preferable. The default is 1. |
| mappingOverrides | Optional | Specifies whether the default behavior is overridden when generating language structures. One
or more of the options can be specified in a comma-separated list.
|
| nameTruncation | Optional | Specifies whether JSON names are truncated from the left or the right. The build toolkit truncates JSON names to the appropriate length for
the high-level language specified; by default names are truncated from the right.
|
| wideComp3 | Optional | Controls the maximum size of the packed decimal variable length in the generated COBOL or
PL/I language structure.
|
Sample properties file for the CICS service provider using a C structure
name=service2
provider=cics
version=1.0
description=An example CICS service for a C structure
program=CICSPGM3
connectionRef=cicsConn
language=C
programInterface=COMMAREA
characterVarying=NO
structure=(CommAreaDetail,CommAreaDetail)
requestStructure=/u/myhome/REQUEST
responseStructure=/u/myhome/RESPONSE
Sample properties file for the CICS service provider using JSON
provider=cics
name=service3
version=1.0
description=An example CICS service
program=CICSPROG
language=COBOL
programInterface=CHANNEL
requestSchema=request.json
responseSchema=response.json
generatedRequestStructure=request.cpy
generatedResponseStructure=response.cpy
connectionRef=cicsConn
- CICS services can only be deployed by
adding them to the services directory. CICS
.sar files reference a
zosconnect_cicsIpicConnectionelement in the server.xml configuration file. - The service is initialized separately from the
zosconnect_cicsIpicConnectionelement, so the service might show as available but without a connection. If the connection is not available to the CICS service either because it is not configured or there is a configuration error, the following message is logged when the service is invoked:BAQR0655E: Service {0} in service archive file {1} references the CICS connection {2} which is either not defined or defined incorrectly. - Specifying the transid or
transidUsage properties when creating a service archive will override the
equivalent attributes on the connection the service uses. The properties
transid and transidUsage can additionally be defined on a
serviceelement under thezosconnect_serviceselement of the server.xml configuration file to set different transactions in different environments with a single service archive. For more information, see Sub elements. - If you run the build toolkit on z/OS to generate a service archive for a CICS COMMAREA program, the values requestStructure and responseStructure can be a UNIX System Services file or a member of a partitioned dataset. To specify a member of a partitioned dataset use the syntax //'partitionDatasetName(member)'. If you run the build toolkit on z/OS to generate a service archive for a CICS channel program, these values must specify a channel description document. The location attribute of the structure element in the channel description document can also support a UNIX System Services file or a member of a partitioned dataset. See the languageStructureCodePage property to indicate the code page of the z/OS partitioned dataset member
- If you do not specify an absolute path for the referenced file, the build toolkit uses a relative path from the directory in which the zconbt command is run.
- All JSON schema files must use UTF-8 encoding.
- Language structure files must use the default code page for the system where the build toolkit is run.
You can now use the build toolkit to create the service archive. For more information, see Generating service archives for DevOps.