Using the Data Stream Translation APIs
Using the data stream APIs, your applications can:
- Translate from a 3270 output data stream to a formatted buffer
- Translate from a 3270 output data stream to a 5250 data stream
- Translate from a formatted output buffer to a 5250 data stream
- Translate from a formatted input buffer to a 3270 data stream
- Translate from a 5250 input data stream to a formatted buffer
- Translate from a 5250 input data stream to a 3270 data stream
- Translate from a 5250 read screen format to a 3270 read buffer format
- Translate from a 5250 read screen with extended attributes to a 3270 read buffer format
The following figures show the translation options available when your application calls the data stream translation APIs.
Translations for Output Operations

Translations for Input Operations

When your application calls the QD0STRTS API, a translation session is opened using a user-specified device as a basis for the translation parameters. You can open as many sessions as you need, because for every session a unique translation session handle is passed back to your application.
A call to the QD0TRNDS API does the actual data stream translation using the specified parameters to indicate the type of translation. Multiple translation sessions can be active at the same time. A translation session remains open, that is the handle remains valid, until the QD0ENDTS API is called using that handle or the job that called QD0STRTS ends. The final call to the QD0ENDTS API closes or ends the translation session.
Note: If you are using the same translation parameters for many translations, you may decide to use only one QD0STRTS call for each unique set of parameters to enhance performance.
Programming Restrictions
The 5250 data streams generated by the QD0TRNDS API for your application have the following restrictions:
- Read commands are not added to the end of a data stream. Your application
is responsible for sending Read modified data tag (MDT) fields to the
destination display.
- If the device for which the data stream is intended does not support data
in row 1, column 1 then this location is restricted from use in the input
field.
- The number of input fields is dependent on the type of work station
controller. The following is a list of the maximum number of input and output
fields allowed per device:
126 3270 display station 255 5250 local display station 126 5250 pass-through 126 5251 display station 230 5294 Remote Control Unit 255 5394 Remote Control Unit 255 5494 Remote Control Unit 254 Client Access running work station function
- Fields that are detectable by light pens are not supported.
There are some 3270 data stream commands, orders, and attributes that are not supported. For a list of the 3270 data stream commands, orders, and attributes that are supported, see the 3270 Device Emulation Support manual, SC41-5408. This manual is not included in this release of the IBM® i Information Center. However, it might be a useful reference to you. The manual is available from the IBM Publications Center as a printed hardcopy that you can order, in an online format that you can download at no charge, or both.
All parameter values must be uppercased and left justified.