The CICS portion of the cooperative processing functions is provided in the IBI supplied module CMSOAPI. This module contains the functional code that supports the individual calls available to CICS transactions. When this module is link edited with a CICS transaction module, five functions become available to the module. |
How to: |
Syntax and descriptions of the functions follow:
This function starts an MSO session for the user by logging on to MSO. It defines the details of the MSO/CICS conversation processing that will take place.
CALL CMSOLGN(EIB, COMMAREA, MSONAME, USERWD, NEXTPROG, LOGONBUF)
where:
An assembler copy file, CMSOAPIA, is supplied in MSO.DATA. This file maps the LOGONBUF. The fields and their meanings are listed in the table below. All fields are alphabetic.
Field Name |
Length |
Contents |
LOGAPPL |
8 bytes |
A load balancing parameter that limits MSO region selection to those service groups that specify the same application name. |
LOGSERV |
8 bytes |
Specifies the particular MSO Service Group that this user should be started in. It applies to load balancing as well as a single region MSO. |
LOGTRAN |
4 bytes |
This defines the CICS transaction that will be invoked when the CICSCOMM FUSELIB routine is called in the MSO region. It is mutually exclusive with NEXTPROG in the invocation parameters. Only one should be specified. |
LOGBREAK |
4 bytes |
Break key (PF/PAnn). Identifies the key that will unconditionally terminate the active MSO session. |
LOGSUSP |
4 bytes |
Suspend key (PF/PAnn). Identifies the key that will cause the active MSO session to suspend operation. When this key is pressed, the LOGTRAN or NEXTPROG CICS transaction (whichever was specified) will be invoked in the CICS region. |
LOGELVL |
4 bytes |
Error level (ALL,ERR,NONE). Controls what messages are displayed to the user when the MSO session ends. ALL - All messages are displayed ERR - Only error messages are displayed NONE - No messages are displayed |
LOGGROUP |
8 bytes |
Logon group name. The load balancing group name. It controls the MSO load balancing group that the user will be started in. |
LOGVALID |
1 byte |
Security check flag (N/Y). Y must be specified for the reconnect service (CMSOREC call) to work. In addition, UNIQUE=LOGONID must be specified in the MSO configuration file. |
LOGINITM |
1 byte |
Suppress initialization message flag (N/Y). Y suppresses the MSO initialization message. |
LOGFLAG1 |
1 byte |
Reserved flag |
LOGFLAG2 |
1 byte |
Reserved flag |
LOGRESV |
20 bytes |
Reserved |
LOGACCT |
40 bytes |
Account. Specifies the MSO account field. This field will be recorded in the MSO SMF records when that feature is active. |
LOGUPRM |
256 bytes |
Logon parameter. The content of this field is available to FOCEXECs via the MSOINFO subroutine. It is generally used to provide control information to the MSO profile exec so that specific FOCUS applications may be invoked in the MSO region. |
This function is used to interrogate the MSO/CICS control program. The returned parameters identify the particular conversation that had a status change, the current status of the conversation, and any data that may have been received from MSO. It is usually the first MSO/CICS Cooperative Processing service used in the transaction that is triggered by the CICSCOMM subroutine (NEXTPROG or LOGTRAN).
The FUNCTION field is set based on either an event in the MSO region or if an event in the CICS region caused the status. The FUNCTION codes that are returned are described in CMSORCV Function Codes.
CALL CMSORCV(EIB, COMMAREA, FUNCTION, CONNID, USERWD, INLEN, OUTLEN, BUFFER, ERRNUM)
where
When using the CMSORSM, the LENGTH parameter may not exceed the value of OUTLEN. If it does, the data presented to the MSO FOCEXEC is truncated to the value of OUTLEN.
This function re-establishes a MSO/CICS session based upon the current user's CICS id. The connect id may be supplied if known. Otherwise, the function uses a connect id of 0 and the userid to identify the session. This condition may be caused by the user powering off their terminal while an MSO/CICS session is active and then logging on to CICS again.
Security flag - If the security flag in the logon buffer is set to yes, then the resuming or reconnecting userid is validated against the known userid. The reconnection is rejected if they do not match. If present, userid determination is subject to the MSCXUID exit. The default for the security flag in the logon buffer is no.
CALL CMSOREC(EIB, COMMAREA, MSONAME, CONNID, NEXTPROG)
where:
This function stops an MSO/CICS session immediately. MSO must have passed control to the CICSCOMM FUSELIB program before a stop can be issued. A CMSOSTP received while MSO is still in control is treated as a protocol error.
CALL CMSOSTP(EIB, COMMAREA, MSONAME, CONNID, NEXTPROG)
where:
This function sends data to an MSO FOCUS session that previously issued the CICSCOMM FUSELIB routine or resumes an existing MSO/CICS session that was suspended by the user with the suspend key. Data may be sent in both cases but will be ignored if the session is in a suspended state. A CMSORSM received while MSO is still in control is a protocol error. If there is data, a buffer is allocated which is freed by MSOCICS.
CALL CMSORSM(EIB,COMMAREA,MSONAME,CONNID,NEXTPROG,LENGTH,BUFFER)
where:
Information Builders |