Displaying Data
To display up to a full screen of data, code a CCW using the following assembler
language instructions: DS OD DC ALl (CCWCODE) ,AL3(DATADDR) ,AL1 (FLAGS) ,AL1 (CTL) ,AL2(COUNT) where: CCWCODE is the command code X'19'.
DAT ADDR is the virtual storage address of the first byte of data to be displayed.
FLAGS
CTL COUNT are standard CCW flags. The suppress-incorrect-Iength indicator, bit
34, must be set to a value of one. Set other bits as needed.
is a control byte defined as follows:
The high-order bit (0), if set on, enables the screen "MORE" sta­
tus to be active before the displaying of data.
Bits 2-7 identify the line on the display screen where the display is
to start. A value of 0 (B'xxOO 0000') corresponds to the first or
top line, a value of 1 (B'xxOO 0001 ') corresponds to the second
line and so forth.
If the control byte contains the value X'FF', CP erases the display
station's screen. No new data is displayed.
CCW's may be command chained to combine several operations in
one DIAGNOSE. When CP builds the real CCW string, it will
data chain as many CCW's as possible to reduce the number of
real IIO operations. If the control byte contains a value of X'FE', CP will:
Not data chain this operation to any previous CCW in the real
CCW string.
Erase the entire screen.
Rewrite the attribute bytes for the CP screen format.
Reset the cursor to the beginning of the input area.
specifies the number of bytes of data to be displayed. The maximum
that can be specified for this command code is 2032 bytes. The max­
imum amount of data that can be displayed at one time depends upon
the 3270 model of the display station:
A model 2 can display up to 1760 bytes
A model 3 can display up to 2400 bytes
A model 4 can display up to 3280 bytes
A model 5 can display up to 3300 bytes DIAGNOSE Instruction in a Virtual Machine 247
Full Screen Mode
To provide attribute characters for the data, place the attribute character in the
data stream immediately following a 3270 start-field order. The start-field order, a
one-byte value, notifies the 3270 display system that the next byte in the data
stream is an attribute character. For a description of how the 3270 display system
uses attribute characters, and to determine the values to specify for attribute char­
acters and the start-field order, see the IBM 3270 Information Display System
Library User's Guide.
Note: Through the use of the attribute character, it is possible to define a display
field as selector-pen detectable. However, when the selector pen is used to select
the field, CP does not return data from the field to the virtual machine. After
processing DIAGNOSE code X'58', CP sets a condition code. If the operation was
successful -that is, no I/O errors occurred -CP sets a condition code of zero. If
an I/O error occurred, CP sets a condition code of one.
If an I/O error occurred, the application program can check the I/O status and the
error type by:
Issuing a TEST I/O (TIO) instruction
Examining the returned condition code
Examining the virtual CSW
The returned condition codes and CSW status are the standard condition codes and
status defined in the IBM System/3 70 Principles of Operation.
You must also make sure that the interrupt for the virtual device is enabled by set­
ting the appropriate bit and channel mask in the PSW. For example, if the virtual
address of your console is 009, bit 0 in the channel mask must be set to one (that
is, bit 0 must be on). This may be the case if you are loading programs in the tran­
sient area. DIAGNOSE X'58' provides a means by which a virtual machine may share, with
CP, control of a 3270 display station. Two CCW operations, X'29' and X'2A', in
addition to performing the requested I/O, notify CP that the display station is
operating under the control of the virtual machine.
CCW code X'29' performs a WRITE, ERASE/WRITE, ERASE/WRITE
ALTERNATE, or WRITE STRUCTURED FIELD operation, depending on the
value of the control field. For the WRITE, ERASE/WRITE, and ERASE/WRITE
ALTERNATE, the virtual machine must provide appropriate control information
beginning with the Write Control Character (WCC) and including 3270 orders fol­
lowing the WCC. Data may be written anywhere on the screen. The virtual
machine must provide the address where the write is to begin; it uses a SET
BUFFER ADDRESS (SBA) order to do this. Writing can also start at the current
cursor address.
CCW code X'29' performs a WRITE STRUCTURED FIELD operation when the
value of the control field is X'20'. The WRITE STRUCTURED FIELD instruc­
tion sends control information to a 3274 controller. The application program must
provide the control information in the data stream in the format required by the
instruction. (See the 3270 Component Description for more information on WRITE
STRUCTURED FIELD operation.)
248 VM/SP System Programmer's Guide
Previous Page Next Page