The outbound data stream example shows the data stream
required to paint a particular 3270 screen, to reinforce the
explanation
of how the data stream is built.
Figure 1
shows an example
screen that is part of an application that tracks cars used by the
employees at a work site, and is used to record a new car. The only
inputs are the employee identification number, the license plate
(tag)
number, and, if the car is from out-of-state, the licensing state.
Figure 1. Example of a data-entry screen
Car Record
Employee No: ______ Tag No: ________ State: __
Note: This is an unrealistically simple screen, designed
to keep the explanation manageably short. It does not conform to
accepted
standards of screen design, and you should not use it as a model.
There are eight fields on this screen:
Screen title, “Car Record”, on line 1, column 26
Label field, “Employee No:” (line 3, column 1), indicating what
the operator is to enter into the next field
An input field for the employee number (line 3, column 14), 6
positions long
Label field, Tag. No:, at line 3, column 21
An input field (tag number) at line 3, column 31, 8 positions
long
Label field, State:, at line 3, column 40
An input field (state), at line 3, column 49, 2 positions long
A field to mark the end of the previous (state) input field, at
line 3, column 52
The 3270 command that starts the data stream,
in this case erase/write.
2
X'C2'
WCC; this value unlocks the keyboard, but does
not sound the alarm or reset the MDTs.
3
X'11'
SBA order to position first field at …
4-5
X'40D6'
Address of line 1, column 23 on 24 by 80
screen,
using 12 bit addressing.
6
X'1D'
SF order to begin first field definition.
7
X'F8'
Field attributes byte; this combination
indicates
a field which is autoskip and bright, with the MDT initially off.
8-17
'Car record'
Display contents of the field.
18-20
X'11C260'
SBA sequence to reset the current buffer
position
to line 3, column 1 for second field.
21
X'1D'
SF order for second field.
22
X'F0'
Field attributes byte: autoskip, normal
intensity,
MDT off.
23-34
'Employee No:'
Display contents of field.
35
X'29'
SFE order to start fourth field. SFE is
required,
instead of SF, because you need to specify extended attributes. This
field starts immediately after the previous one ended, so you do
not
have to precede it with an SBA sequence.
36
X'02'
Count of attribute
types
that are specified
(two here: field outlining and field attributes).
37
X'41'
Code indicating attribute type of extended
highlighting.
38
X'F4'
Extended highlighting value indicating
underscoring.
39
X'C0'
Code indicating attribute type of field
attributes.
40
X'50'
Field attributes value for numeric-only,
normal
intensity, MDT off. Any initial data for this field would appear next,
but there is none.
41
X'13'
Insert cursor (IC) order, which tells the 3270
to place the cursor at the current buffer position. We want it at
the start of the first field which the operator has to enter
data,
which is the current buffer position.
42-44
X'11C2F4'
SBA sequence to position to line 3, column 21,
to leave the six positions required for an employee number. The
beginning
of the Tag No label field marks the end of the employee number
input
field, so that the user is aware immediately if they try to key too
long a number.
45
X'1D'
SF order to start field.
46
X'F0'
Field attributes byte: autoskip, normal
intensity,
MDT off.
47-55
' Tag No:'
Display data. We attach two leading blanks to
the label for more space between the fields. (We could have used
a
separate field, but this is easier for only a few characters.)
56
X'29'
SFE (the next field is another input field,
where
we want field outlining, so we use SFE again).
57
X'02'
Count of attribute types.
58-59
X'41F4'
Code for extended highlighting with value of
underscoring.
60-61
X'C040'
Code for field attributes and attributes of
unprotected,
normal intensity, MDT off.
62-64
X'11C3C7'
SBA sequence to reposition to line 3, column
40,
leaving eight positions for the tag.
65
X'1D'
SF to start field.
66
X'F0'
Field attributes byte: autoskip, normal
intensity,
MDT off.
67-74
' State:'
Field data (two leading blanks again for
spacing).
75-80
X'290241F4C040'
SFE order and attribute specifications for
state
input field (attributes are identical to those for tag input field).
81-82
X'0000'
The (initial) contents of the state field. We
could have omitted this value as we did for other input fields,
but
we would need an SBA sequence to move the current buffer position
to the end of the field, and this is shorter.
83
X'1D'
SF. The last field indicates the end of the
previous
one, so that the user does not attempt to key more than two
characters
for the state code. It has no initial data, just an attributes byte.
This field is sometimes called a “stopper” field.
84
X'F0'
Field attributes byte: autoskip, normal
intensity,
MDT off.
Note:
If you use terminal control commands and build your
own data stream, the data you provide in the FROM parameter of your
SEND command starts at byte 3 in the table;
CICS®
supplies
the write command and the WCC from options on your SEND command.