The output datastream

To create a 3270 display, you send a stream of data that consists of:

The WCC and display data are not always present; the write command determines whether a WCC follows and whether data may or must be present.

When you use BMS, CICS® builds the entire data stream for you. The WCC is assembled from options in the SEND command, and the write command is selected from other SEND options and information in the PROFILE of the transaction being executed. Display data is built from map or text data that you provide, which BMS translates into 3270 format for you.

When you use terminal control commands, such as SEND, CICS still supplies the write command, built from the same information. However, you provide the WCC and you must express the display data in 3270 format.

3270 write commands

Even though CICS supplies the write command, you need to know the possibilities, so that you can select the options that produce the one you want. There are five 3270 commands that send data or instructions to a terminal:

The 3270 write command sends the data that follows it to the 3270 buffer, from which the screen (or printer) is driven. Erase/write and erase/write alternate also do this, but they erase the buffer first (that is, they set it entirely to null values). They also determine the buffer size (the number of rows and columns on the screen), if the terminal has a feature called alternate screen size.

Terminals with this feature have two sizes, default size and alternate size. The erase/write command causes the default size to be used in subsequent operations (until the next erase/write or erase/write alternate command), and erase/write alternate selects the alternate size, as the names suggest.

CICS uses the plain write command to send data unless you include the ERASE option on your SEND command. If you specify ERASE DEFAULT on your SEND, CICS uses erase/write instead (setting the screen to default size), and ERASE ALTERNATE causes CICS to use erase/write alternate (setting alternate size). If you specify ERASE without DEFAULT or ALTERNATE, CICS looks at the PROFILE definition associated with the transaction you are executing to decide whether to use erase/write or erase/write alternate.

The erase unprotected to address command causes a scan of the buffer for unprotected fields (these are defined more precisely in 3270 field attributes). Any such fields that are found are set to nulls. This selective erasing is useful in data entry operations, as explained in The SEND CONTROL command. No WCC or data follows this command; you send only the command.

Write structured fields causes the data that follows to be interpreted as 3270 structured fields. Structured fields are required for some of the advanced function features of the 3270. They are not covered here, but you can write them with terminal control SEND commands containing the STRFIELD option. See the IBM CICS/OS/VS 3270 Data Stream Device Guide if you wish to do this.

Write control character

The byte that follows a 3270 write, erase/write or erase/write alternate command is the write control character or WCC. The WCC tells the 3270 whether or not to:

In BMS, CICS creates the WCC from the ALARM, FREEKB, FRSET, and PRINT options on your SEND MAP command. If you use terminal control commands, you can specify your WCC explicitly, using the CTLCHAR option. If you do not, CICS generates one that unlocks the keyboard and turns off the modified data tags (these are explained shortly, in Modification).

[[ Contents Previous Page | Next Page Index ]]