Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Sending and receiving formats

&pagelevel(4)&pagelevel

A CPI-C client using the UPIC carrier system can together with a user message, send format names to a UTM service and receive format names from a UTM service.

The format names transferred with the user message can be used to describe the data format of the user data. The user data and format names that are exchanged between client and server are transferred transparently, i.e. they can contain any bit combinations, which must be interpreted by the recipient of the message. The user message is not processed by a form generating system by means of the format name.

The format names exchanged between UPIC and UTM can generally be freely selected, as can the structure. The structure information is important if programs written for terminals are to be used to communicate with UPIC clients. In this event, the format ID plays a role. The format ID is made up of a prefix (-, +, # or *) and the actual format name.

UPIC clients and UTM programs use the format names which are defined in the UTM application in order to specify the structuring characteristics of a message. For each format ID that the UTM application recognizes there is a data structure (addressing aid) in the UTM application. A UPIC client can also use this function to call UTM applications which communicate with terminals using formats. To do this the client program must transfer the format ID that the UTM program expects. The user message is then made up according to the format IDs.

In the same way, when sending format data the UTM server application passes on to the client program the format identifier which describes the structure of the message area.

CPI-C calls for exchanging format data

Because the CPI-C interface does not have its own concept for transferring format names to the interface, UPIC uses the functions

Send_Mapped_Data and
Receive_Mapped_Data

to send and receive messages together with format names.

To send format data to the UTM server application, call Send_Mapped_Data. In the map_name field of the call, the client transfers the format ID as structure information for the message which is to be sent to the UTM server application.
The message must be structured according to the format defined in the server application. Send_Mapped_Data is described on section “Send_Mapped_Data - Sending data and format identifier”.

If the UTM service returns a format, the client program must call Receive_Mapped_Data in order to receive the message from the UTM service together with the format ID. In the map_name field, UPIC transfers the format ID used by the server to structure the message. In the client program the message must be interpreted according to the structuring used by the UTM service. Receive_Mapped_Data is described on section “Receive_Mapped_Data -Receiving data and format identifier from a UTM service”.

If several partial formats are to be sent to a UTM service, the client program must issue a separate Send_Mapped_Data call for each one. The UTM service reads each partial format with a separate MGET NT call.

By the same token, if a message from the UTM service consists of several partial formats, the client program must issue a Receive_Mapped_Data call for each partial format.

Figure 9: Exchange of formats

Detailed information on working with formats in a UTM application can be found in the openUTM manual „Programming Applications with KDCS”.

UTM format identifiers and -format types

The format names exchanged between a UPIC client program and a UTM program unit can consist of up to 8 characters of your choice. The important thing to remember is that both the communication partners must agree on the structure and meaning of the user data transferred using the format name.

If a client program calls a UTM program unit that also communicates with terminals using format IDs, the format ID must correspond with the rules for form configuring systems supported by openUTM. These format IDs consist of:

  • a one-byte prefix specifying the type of the format (possible values are “*”, “+”, “#” and “-”)

  • a format name up to 7 characters long.

The format types can be classified as follows:

*formats:
The display attributes of the format fields cannot be modified by a UTM program unit. Only the contents of the data fields are transferred.

+formats and #formats:
A UTM program unit can modify the display attributes of the data fields or global attributes. The data fields are therefore assigned attribute fields or blocks. If a +format or a #format is exchanged, the client program must take these attribute fields into account.

-formats
They are formats which are created with the FORMAT event exit.

For more about format IDs and types, see the openUTM manual „Programming Applications with KDCS”.

The rules for format IDs do not need to be observed if a UTM program unit only communicates with UPIC-Client program units. Formatting systems do not play any part in this form of communication.