VBLOCKWRITE [ Migration Process Guide ] MPE/iX 5.0 Documentation
Migration Process Guide
VBLOCKWRITE
The VBLOCKWRITE intrinsic writes a block of characters to a terminal in
block mode. The syntax and parameter descriptions for this intrinsic are
provided below.
VBLOCKWRITE {COMAREA,BUF,LEN,TMODE,LOC,TC}
COMAREA The following COMAREA fields must be set before
calling VBLOCKWRITE, if not already set:
LANGUAGE Set to code identifying the
programming language of the
calling program.
COMAREALEN Set to total number of 2-byte
words in COMAREA.
VBLOCKWRITE may set the following COMAREA fields:
CSTATUS Set to nonzero value if call
is unsuccessful.
FILERRNUM Set to file error code if MPE
file error.
BUF Byte array containing characters to be written to
the terminal.
LEN Number of bytes in the BUF array (2-byte integer).
TMODE Terminal mode (2-byte integer).
0 do not change terminal mode
1 change to format mode
2 change to unformatted mode
LOC Start position of write (array of two 2-byte
integers). Absolute cursor addressing is not
allowed in format mode. An error will be returned.
[0] [0] home cursor before WRITE
[x] [y] start from absolute row x,
column y. (Not allowed in
format mode.)
[-1] [0] start from current position
[-2] [0] start from first available
line of display memory, for
example, the first available
line after the end of a
previous form. (Not allowed
in format mode.)
TC Terminal control (2-byte integer)
0 do not lock keyboard at the
beginning of write; unlock at
the end of write.
1 lock keyboard at the
beginning of write; unlock at
the end of write.
This procedure writes the content of a user buffer to a terminal. TMODE
options can be used to change the terminal to format or unformatted mode
before the write. LOC options allow the programmer to specify the
position of the screen where the write is to begin. Terminal control
(TC) options can be used to control keyboard locking for the protection
of data as it is being written to the terminal. TC = 1 is recommended
for applications which do multiple writes to the terminal with no
intervening reads. Procedures, such as VBLOCKREAD or VREADFIELDS, lock
the keyboard as soon as the terminal begins transmitting data when
triggered by the Enter key or a function key.
VOPENTERM must be called before using this procedure. This procedure is
intended only for advanced programmers who are proficient with terminal
control operations and VPLUS terminal settings. Terminal keyboard
operations, such as PREV PAGE and NEXT PAGE, can be performed
programmatically by sending the appropriate escape sequences to the
terminal via VBLOCKWRITE. VBLOCKWRITE can also be used to write large
blocks of unformatted text or multiple report lines in between uses of
predefined VPLUS forms. To ensure portability of the application from
one driver to another, alteration of terminal straps using VBLOCKWRITE is
not recommended. See VTURNON and VTURNOFF for information on how to
switch between character mode and block mode without disturbing the
screen.
The following examples illustrate a call to VBLOCKWRITE using common
programming languages:
COBOL:
CALL "VBLOCKWRITE" USING COMAREA @BUF LEN TMODE LOC TC.
BASIC:
CALL VBLOCKWRITE(C(*),B1$,L1,M1,L(*),T1)
FORTRAN:
CALL VBLOCKWRITE(COMAREA,BUF,LEN,TMODE,LOC,TC)
SPL:
VBLOCKWRITE(COMAREA,BUF,LEN,TMODE,LOC,TC);
Pascal:
VBLOCKWRITE(COMAREA,BUF,LEN,TMODE,LOC,TC);
MPE/iX 5.0 Documentation