This chapter includes sections about the CallCoordinator application programming interfaces (APIs) related to customizing screen control. These sections are:
This section describes the CallCoordinator interface for screen control information and explains how to write a user screen control program to customize the logic used to control screen activity at agent terminals.
This API enables a user screen control program to START the same transaction at the transferred-to-terminal that was running at the transferred-from-terminal.
This API enables a user screen control program to specify a sequence for screen presentation tasks that would otherwise be asynchronous.
Each section of this chapter explains the function of the API and describes when it would be useful. It also explains how to use the interfaces and defines the CICS communication data area required for each one.
There are other CallCoordinator APIs that can be used in conjunction with a user screen control program. They are described in the following sections of this book:
These APIs are general-use programming interfaces. See "Programming Interfaces" for a definition of general-use programming interfaces.
The CallCoordinator Screen Control Interface passes data from CallCoordinator processes to the screen control program. It can transfer data from a transferred-from screen transaction to a transferred-to screen transaction. The data passed in the interface includes:
See Table 21 for a complete list of field descriptions. You can code a user screen control program to make use of this data.
Screen processing for agents in automatic mode (not in user mode) is controlled by the CallCoordinator default logic for screen control. For initial calls, CallCoordinator STARTs the transaction designated in the Init trans ID field of the COR Telephony Settings or Agent Detail panels, or the Initial Trans ID field of the DNIS to Application, Pilot to Application, or Trunk to Application panels. For transferred calls, it copies screens from one agent to another.
As an alternative to this logic, you can create a user screen control program for agents who need to work in user mode. (User mode is the state in which a user-written CICS application program controls screen presentation for an agent.)
When a user screen control program is invoked by the CallCoordinator screen control program, it overrides the screens that CallCoordinator would display. It runs as a background task to determine which screens to display to agents in user mode. It uses the data from the CallCoordinator Screen Control Interface to control screen processing.
If calls are to be transferred between agents using the same business applications, CallCoordinator automatically uses the Screen Control Interface and its own screen control program.
If calls are to be transferred between agents using different business applications, CallCoordinator still uses the Screen Control Interface and its screen control program. It also needs a customized user screen control program that you write to pass data from one application to another.
For instance, you might want to pass key data from an auto insurance agent's screen to a home insurance agent's screen. This saves time by eliminating redundant requests for information from the caller. This is illustrated in Figure 7.
Figure 7. CallCoordinator Can Display a Different Transaction on the Transferred-to Terminal.

The user screen control program is needed to write the data from the transferred-from screen transaction to a TSQ that will be read by the transferred-to screen transaction. To assist this transfer of data, CallCoordinator generates a unique queue name for every call transfer to an agent specified to be in user mode You can use this queue name to create the TSQ to carry the data from the transferred-from transaction to the transferred-to transaction. See field name QUEUE-NAME in Table 21. Also see "Using the CallCoordinator-Supplied TSQ Name to Pass Data between Screens" and Figure 8.
Other reasons to write a customized user screen control program include the following:
A user screen control program supplements rather than replaces the CallCoordinator screen control program. It provides an alternative method of determining which screen to display to a particular agent for a particular call.
Your system might require multiple screen control programs for its various agent groups and functions. Some agent groups might operate in user mode while others operate under CallCoordinator screen control. Your system can even have multiple user screen control programs, each customized and assigned to a particular agent function. Then, as required for call events associated with an agent (such as an agent receiving a call), CallCoordinator STARTs the user screen control transaction specified for the agent.
To customize screen control, you must write your own CICS user screen control program. The code you write determines which application transaction STARTs for an agent, what screen to display, or what other screen activity should take place for a call.
When CallCoordinator agents sign on, they can select the user screen control program by entering its Transaction ID in the User trans ID field and Y in the User control field of the Agent Sign On/Off panel.
Alternatively, the system administrator can define a default for all agents by entering the Transaction ID in the User trans ID field of the COR Telephony Settings panel. The system administrator can define user screen control programs for specific agents by entering the Transaction ID in the User trans ID field and Y in the User control field of the Agent Detail panel. When the CallCoordinator agent signs on, the agent only needs to enter Y in the User control field of the CallCoordinator Agent Sign On/Off panel.
Refer to the Installation section of CallPath CallCoordinator/CICS System Management Guide for information about configuration settings for user mode.
To create your own user screen control program, do the following:
Table 21. CICS Communication Data Area for the Screen Control Interface (CAMSUSER)
| Field | Attributes | Description |
|---|---|---|
| USER-MODE-QUEUE | N/A | 01 level name. |
| QUEUE-LEN | PIC S9(04) COMP VALUE +388 | The length of this CICS communication data area in bytes. |
| FROM-PROGRAM-NAME | PIC X(08) | The name of the program invoking this API. |
| TO-PROGRAM-NAME | PIC X(08) | Name of the screen control program. |
| FILLER | PIC X(120) | Spaces. Reserved for future use. |
| QUEUE-NAME | PIC X(08) | The screen transfer queue name.
CallCoordinator generates this name to identify a TSQ you can use for
this screen control activity.
The transferred-from transaction
can use this name to create a TSQ to be read by the
transferred-to transaction.
You can use it to pass data gathered during the initial transaction
that is applicable to the transferred-to transaction.
See "Using the CallCoordinator-Supplied TSQ Name to Pass Data between Screens".
Format CXXXXXnn where:
|
| TIME | PIC S9(07) COMP-3 | Time of day the screen control program was STARTed. |
| DELAY | PIC 9(03) COMP-3 | Maximum time that screen transfer can be delayed before it is abandoned. Defined in the Screen delay field of the COR Telephony Settings panel. Refer to the Installation section of CallPath CallCoordinator/CICS System Management Guide. |
| TO-TERM | PIC X(08) | Terminal ID of the target terminal.
Use this value in the START command that you code
in the user screen control program to invoke the
transaction selected by that program.
Example:
EXEC CICS START
TRANSID(name)
TERMID(CAMSUSER-TO-TERM)
END-EXEC.
|
| FROM-TERM | PIC X(08) | Terminal ID of the transferred-from terminal (if any). |
| TRANS | PIC X(08) | The Transaction ID of the transferred-from application program. The first time, this contains the Transaction ID of the CallCoordinator screen control program. You can use the Get Next CICS Transaction API to get the return Transaction ID. See "Get Next CICS Transaction ID API (CAMS515C)" |
| ACI | PIC 9(09) | Application connect ID assigned to this call by CallCoordinator. One of the call indices. See "Write MIS Record API (CAMI700C)". |
| CUST-CNTL-NBR | PIC X(30) | Customer control number (if any). Can be alphanumeric and in any format. Added from your business application programs. See "Set Control Number API (CAMI730C)". |
| DNIS | PIC X(32) | The last 12 characters of the dialed number identification service (DNIS) number. Used for determining the initial transaction to be STARTed on a call received on a DNIS number. Contains data if the DNIS feature is installed and a DNIS number was dialed. |
| CALLER | PIC X(10) | Originating caller's telephone number. |
| CMCT-INDX | PIC 9(04) | CallCoordinator Call Management Control Table(CMCT) index number. Index number of the record that contains the CallCoordinator Call Management Control Table entry. |
| QUEUE-FLAG | PIC X | Reserved for future use. |
| ACTION-CODE
Note: ACTION-CODE is continued on the next page. | PIC X(02) | The reason the user screen control transaction was
STARTed and the processing required when that was the
reason.
|
| ACTION-CODE (continued) | PIC X(02) | Continued from previous page.
|
| ANI-TABLE | PIC X(02) | The source of
the Automatic Number Identification (ANI) number.
|
| ANI-NUMBER | PIC X(32) | The last 10 characters of the ANI number.
Contains data if ANI data is supported and present.
The telephone number of the calling party (billable number).
Up to 10 digits AAAOOONNNN where:
|
| REINIT-FLAG | PIC X |
|
| REINIT-INITIAL- TRANS | PIC X(08) | Initial Transaction ID set by the Re-initialize API. |
| DNIS-EXT | PIC X(32) | DNIS number. The number dialed that the switch passed. Used to determine the initial Transaction ID. |
| ANI-EXT | PIC X(32) | The complete ANI number. The telephone number of the calling party (billable number), left-justified and filled with spaces. Contains data if ANI data is supported and present. |
| TASK-SEQUENCE- CONTROL-BLOCK | PIC X(54) | Task sequencing control block. |
| CALLER-TYPE | PIC X(1) | Caller type.
|
| TO-COR-SYSID | PIC X(4) | CICS SYSID of the COR in which the TO-TERM is active. |
| TO-TOR-SYSID | PIC X(4) | CICS SYSID of the TOR in which the TO-TERM is signed-on. |
| FROM-COR-SYSID | PIC X(4) | CICS SYSID of the COR in which the FROM-TERM is active. |
| FROM-TOR-SYSID | PIC X(4) | CICS SYSID of the TOR in which the FROM-TERM is signed-on. |
| FILLER | PIC X(10) | Spaces. Reserved for future use. |
EXEC CICS RETRIEVE INTO(CAMSUSER-USER-MODE-QUEUE)
LENGTH(CAMSUSER-QUEUE-LEN)
RESP(RESP-CODE)
END-EXEC.
The processing implications of your own applications determine the actual specifications of your user screen control program. The following situations can help you consider the requirements of your program:
Table 13 lists the data fields provided by this API. You can use the TO-TERM field of the Screen Control Interface to pass this data to the user screen control program.
For example, if the AGENT-FUNC field indicates that the transferred-to agent is a broker, START the transaction to display the menu for brokers. If the AGENT-FUNC field indicates that the transferred-to agent is a life insurance agent, START the transaction to display the panel for life insurance policy inquiries.
If USER-MODE-TRANS-ID is not spaces, START the transaction specified in that field. If USER-MODE-TRANS-ID is spaces, START the Transaction ID specified in the INIT-TRANS-ID field.
In working storage:
01 LINK-TO-TERM-OWN-REGION PIC X(04). /* MRO only */
01 RESP-CODE PIC S9(08) COMP.
In the procedure division:
EXEC CICS INQUIRE /* MRO only */
TERMID(CAMSUSER-TO-TERM) /* MRO only */
REMOTESYSTEM(LINK-TO-TERM-OWN-REGION) /* MRO only */
RESP(RESP-CODE) /* MRO only */
END-EXEC. /* MRO only */
IF RESP-CODE NOT EQUAL ZEROES /* MRO only */
PERFORM ERROR-GET-REGION. /* MRO only */
EXEC CICS START TRANID (selected Transaction ID)
TERMID(CAMSUSER-T0-TERM)
SYSID(LINK-TO-TERM-OWN-REGION) /* MRO only */
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-START-TRAN.
To do this, include instructions in your user screen control program to save the terminal environment of the transferred-from terminal and display it on the other terminal.
These two transactions are part of screen control and must both run in the CallCoordinator region.
In a SYSPLEX environmnet, the following information is supplied:
CAMSUSER-TO-COR-SYSID
CAMSUSER-TO-TOR-SYSID
CAMSUSER-FROM-COR-SYSID
CAMSUSER-FROM-TOR-SYSID
For a description of the above fields,
see the final rows of table Table 21
on page reference #1.
This information, together with the start code, should enable the user
to perform User-Mode Coordinated Voice and Data Transfer.
In the save transaction (abcd), include instructions to do the following:
You can create a temporary storage queue (TSQ) using the CallCoordinator supplied queue name and use it as the save area. (The Screen Control Interface field name is QUEUE-NAME.)
Notes:
In the restore transaction (wxyz), include these instructions:
CallCoordinator generates and passes a TSQ name to the transaction of the user screen control program. See field name QUEUE-NAME in Table 21. You can apply this name to a TSQ used to pass data from a transferred-from screen transaction to a transferred-to screen transaction. See Figure 8.
You can use this TSQ to:
Figure 8. Using the CallCoordinator-Supplied TSQ Name to Pass Data Between Screens

To use the TSQ name to pass data between screens, include instructions to do the following:
01 PASS-TSQ-NAME PIC X(08).
01 LINK-TO-TERM-OWN-REGION PIC X(04). /* MRO only */
01 RESP-CODE PIC S9(08) COMP.
In the procedure division:
EXEC CICS INQUIRE /* MRO only */
TERMINAL(CAMSUSER-TO-TERM) /* MRO only */
REMOTESYSTEM(LINK-TO-TERM-OWN-REGION)/* MRO only */
RESP(RESP-CODE) /* MRO only */
END-EXEC. /* MRO only */
IF RESP-CODE NOT EQUAL ZEROES /* MRO only */
PERFORM ERROR-INQUIRE-REGION. /* MRO only */
MOVE CAMSUSER-QUEUE-NAME TO PASS-TSQ-NAME.
EXEC CICS START TRANID (selected Transaction ID)
SYSID(LINK-TO-TERM-OWN-REGION) /* MRO only */
FROM(PASS-QUEUE-NAME)
TERMINAL(CAMSUSER-T0-TERM)
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-START-TRAN.
01 PASSED-TSQ-NAME PIC X(08).
05 NAME PIC X(06).
05 COUNTER PIC 9(02).
01 QUEUE-LENGTH S9(04) COMP VALUE +08.
01 RESP-CODE PIC S9(08) COMP.
Note: The queue name has two parts. The first 6 bytes are unique to the call. The last 2 bytes are a counter. CallCoordinator increments this counter by 1 each time it invokes the user screen control program for the same call.
In the procedure division:
EXEC CICS RETRIEVE
INTO(PASSED-QUEUE-NAME)
LENGTH(QUEUE-LENGTH)
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-RETRIEVE.
For example, in working storage:
01 RESP-CODE PIC S9(08) COMP.
In the procedure division:
EXEC CICS WRITEQ TS
QUEUE(PASSED-TSQ-NAME)
FROM(data-area)
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-WRITE-QUEUE.
Note: If the value of the counter portion of the queue name is greater than zero, such a queue might have already been created for a previous transaction for this call. You can copy this queue and add data to it if needed. See the example in the following item.
Subtract one from the counter portion (last 2 bytes) of the passed queue name. Then transfer the data.
For example, in working storage:
01 PASSED-TSQ-NAME PIC X(08).
05 NAME PIC X(06).
05 COUNTER PIC 9(02).
01 RESP-CODE PIC S9(08) COMP.
In the procedure division:
SUBTRACT 1 FROM COUNTER.
EXEC CICS READQ TS
QUEUE(PASSED-TSQ-NAME)
INTO(data-area)
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-READ-QUEUE.
For example, in the procedure division:
EXEC CICS DELETEQ TS
QUEUE(PASSED-TSQ-NAME)
RESP(RESP-CODE)
END-EXEC.
IF RESP-CODE NOT EQUAL ZEROES
PERFORM ERROR-DELETE-QUEUE.
Because all of your applications can run as either the transferred-to or transferred-from screen transaction, you need to modify each application to both read and write the TSQ.
This API allows an application program to get the next Transaction ID from the Terminal Control Table Terminal Entry (TCTTE) for the transferred-from terminal. After execution, the next transaction in the the TCTTE for the transferred-from terminal is reset to low values.
A user screen control program can use this API to get the Transaction ID of the transferred-from terminal. This would be appropriate when the user screen control program determines that it needs to START the same transaction for the transferred-to terminal. See "User Screen Control Program" and "Save Transaction".
To use the Get Next CICS Transaction ID API in your application program, do the following:
Table 22. CICS Communication Data Area for the Get Next CICS Transaction ID API
| Field | Attributes | In/out | Description |
|---|---|---|---|
| COMMAREA-DATA | N/A | N/A | 01 level name. |
| NEXT-CICS-TRANS-ID | PIC X(04) | Out | The Transaction ID that is to be run at the target terminal. |
EXEC CICS LINK PROGRAM('CAMS515C')
COMMAREA(COMMAREA-DATA)
LENGTH(04)
END-EXEC.
This API allows a user screen control program to control the sequence of execution of asynchronous tasks associated with a particular telephony session. The agents involved in the telephony session might both be in user mode. Alternatively, one agent might be in automatic mode and the other one in user mode.
The asynchronous tasks can use this API in two ways:
Transactions use this function of the API to request a status code. The status code returned by the API indicates what the requesting transaction should do at that time:
Tasks use this function of the API to indicate their completion. Multiple CICS transactions might be required to complete the function for which the transaction was STARTed. When this is the case, each of the transactions should STARTed the next one. The last transaction in the chain should be the one to post completion.
See Table 23 for descriptions of all input and output fields of this API.
CICS is designed to control the sequencing of tasks that involve a single terminal and also control the dialog between that terminal and the host computer. For the user screen control program to transfer the screen environment from one terminal to another, two tasks must be STARTed on two different terminals. One task saves the environment of the transferred-from terminal and the other task restores that saved environment to the transferred-to terminal.
In this case, it is possible that the save task might not finish its processing before the restore task begins its processing.
You can use this API to sequence the tasks so that the saving task and the restoring task are performed in the proper sequence. This ensures a successful screen transfer between the two terminals.
Other uses of this API are the following:
To use the Task Sequencing API in your user screen control program, do the following:
If calling the API from COBOL II or later, INITIALIZE
the Communication data area (CAMC784-COMMAREA-DATA)
before setting any of the fields.
Table 23. CICS Communications Data Area for the Task Sequencing API (CAMC784)
| Field | Attributes | In/out | Description |
|---|---|---|---|
| COMMAREA | N/A | N/A | 01 level name. |
| COMMAREA-LEN | PIC S9(04) value +195 | In/out | Length in bytes of the CICS communication data area. |
| COMMAREA-DATA | N/A | N/A | 03 level name. |
| FROM-PROGRAM-NAME | PIC x(08) | In | The name of the program invoking this API. |
| TO-PROGRAM-NAME | PIC X(08) | In | The name of this API (CAMI784C). |
| COR-SYSID | PIC X(4) | In | In a sysplex environment this is required. The CICS SYSID of the COR in which the API is to execute. |
| FILLER | PIC X(114) | N/A | Spaces. Reserved for future use. |
| RETURN-CODE | PIC S9(04) COMP | out |
|
| REASON-CODE | PIC S9(04) COMP | Out | For routing errors see "API Router".
|
| TSQ-REQUEST | PIC X | In | The function requested is:
|
| TASK-CONTROL-BLOCK | PIC X(54) | In | The TSTCB passed from the CallCoordinator Screen Presentation Manager or the previous transaction in an execution chain. |
EXEC CICS LINK PROGRAM ('CAM1784C')
COMMAREA(CAMC784-COMMAREA)
LENGTH(CAMC784-COMMAREA-LEN)
END-EXEC.
If your user screen control program uses a chain of CICS transactions to perform its function, their sequence should be indicated by the program. Each transaction should do the following:
If this transaction is the last in the chain of transactions specified by the user screen control program, it should invoke the API using the code for the Post Task Completion function.