Skip to main content

4. Data Flow Examples

The following examples illustrate the flow of data between the client and server for some of the more common operations. These examples are intended to show the order in which the logical records are sent between the client and server and the content of those records. The hex representation of the records which are exchanged between the client and server is shown. The way in which a client implements the various operations will differ between implementations and those details are not discussed here. In these examples, when the value of a field is dependent on the length of the screen data for a particular logical record, it will be represented as 'LLLL'.

4.1 Query Device Example​

A Query command may be sent by the server system in order to determine the attributes of the device it is talking to. When a client receives a Query command, it must send the Query Reply back to the server. See section 5 for a complete description of the format for the Query command and Query Reply.

Server: Sends Write Structured    001112A0 00000400 000304F3 0005D970
Field Query command. 00FFEF

Client: Responds with a Query 004712A0 00000400 00000000 88003AD9
Reply, in this case, 70800600 01030000 00000000 00000000
for a 3180-2. 00000000 00000001 F3F1F8F0 F0F0F202
00000061 50000100 00000018 11000000
00000000 000000FF EF

4.2 Cancel Invite Example​

The server will send a Cancel Invite when it needs to reverse the normal flow direction. When a client receives a Cancel Invite, it should reply with a Cancel Invite and not send any user data until the server has once again "invited" the work station. A work station is said to be "invited" when the server has sent a read command to the client. The Cancel Invite flow is as follows:

Server: Sends header with the     000A12A0 00000400 000AFFEF
Opcode = Cancel Invite.

Client: Sends header with the 000A12A0 00000400 000AFFEF
Opcode = Cancel Invite
to indicate that the
work station is no
longer invited.

4.3 System Request Example​

The 5250 System Request operation is invoked when a client wants to interrupt the server job to perform some function. The typical scenario would be for a user to press the system request key, or whatever key is mapped to a system request key, which would cause the client Telnet to initiate the following flow:

Client: Sends header with the     000A12A0 00000404 0000FFEF
System Request bit set.

Note: It is possible for a client to include user data in this record following the header. This data would be interpreted by the server as an option to be selected from the system request menu. If this were the case, the server would not send the system request menu and the flow would continue based on the option selected. For this example, the client does not send any user data and the flow would continue as follows:

Server: Sends header with the     000A12A0 00000400 000AFFEF
Opcode = Cancel Invite.

Client: Sends header with the 000A12A0 00000400 000AFFEF
Opcode = Cancel Invite
to indicate that the
work station is no
longer invited.
Server: Sends Save (Immediate)    000C12A0 00000400 00040402 FFEF
command with
Opcode = Save Screen.

Client: Sends the screen image LLLL12A0 00000400 00040412
to be saved. <Screen Image> FFEF

Server: Sends System Request LLLL12A0 00000400 0003
menu with <System Request Menu> FFEF
Opcode = Put/Get.

Client: Sends User Input to LLLL12A0 00000400 0000
the Sys Req menu. <User Input> FFEF

Note: What happens next will depend on the System Request option selected by the user. After any System Request processing has completed, the server will continue with the following restore operation:

Server: Sends the saved           LLLL12A0 00000400 00050412
screen to be restored, <Saved Screen> FFEF
Opcode = Restore Screen.

(No reply is necessary from the client)

Server: Sends Read Modified       000E12A0 00000400 00010452 0000FFEF
Data Tag (MDT) command,
opcode = Invite.

At this point the client would "invite" the workstation and enter the state that it was in prior to the System Request key being hit.