Defining Fields Programmatically; Transmit Modified Fields; Transferring Form Structures From The Screen To A Host Computer - HP 2624 Manual

Display terminals
Table of Contents

Advertisement

Note that any change of video enhancements between the
"start field" and "stop field" locations will be cleared
whenever they lie within the range of a clear display or
clear field operation. If you wish to define a video enhance-
ment for an entire field, you must do so before pressing the
"START FIELD" or "START XMIT FLD" function keys. Video
enhancements enabled in conjunction with the start of a
subfield (that is, within the overall bounds of a field) will be
lost when a clear display or clear field operation is sub-
sequently performed.
Defining Fields Programmatically
From a program executing in a host computer, you may
define "unprotected" and "transmit-only" fields with the
various attributes by using escape sequences. An <ESC> [
specifies the start of an "unprotected" field, an <ESC){
specifies the start of a "transmit-only" field, <ESCHe se-
quences define the various attributes of each field or sub-
field, and an <ESC>
1
specifies the end of the field.
The general format of the <ESCHe sequence is as follows:
<ESC>&e
[r or R
1
[j
or
J
1
[ t
or
Tl
[xxe
or
xxEl
(REQUIRED)
(JUSTIFY)
(TOTAL FILL>
(Field Type)
where
xx
signifies the desired field type as follows:
o
=
all characters
1
=
alphabetic
2
=
auto-upshift
3
=
alphanumeric
4
=
integer
5
=
signed decimal
6
=
implied decimal
7
=
constant
8
=
integer fill
9
=
signed decimal fill
10
=
implied decimal fill
11
=
numeric
12-19
=
(unused)
The final identifier in,each sequence must be uppercase (R,
J, T, or E) and all preceding identifiers must be lowercase
(r, j ,
t, or e).
If the r,
j,
and/or
t
identifiers are omitted from the field
definition, the associated attribute is assumed to be "off"
(i.e., OPTIONAL, NO JUSTIFY, and/or NO TOTAL FILL,
respectively). If the field type parameter is omitted from
the field definition, it is assumed to be ALL CHARACTERS.
The same sequence of operations applies when defining
fields and subfields programmatically as when doing so
through the keyboard. For example, if you wish the overall
field to include video enhancements, you must issue the
appropriate <ESC>&d sequence before issuing the <ESC> [
or <ESC>{ sequence. To define the start of a subfield, you
issue an appropriate <ESCHe sequence at the point where
the subfield is to begin.
Designing and Using Forms
For compatability with the HP 264x family of terminals,
you may also use the following escape sequences to specify
field types:
• <ESC>6
=
begin alphabetic field (A through Z, a through
Z,
and space only)
• <ESC>
7
=
begin numeric field (space, 0 through 9, minus
sign, plus sign, comma, and decimal point)
• < ESC>8
=
begin alphanumeric field (all keyboard charac-
ters)
Transmit Modified Fields
Each field in a formatted display has a Modified Data Tag
(MDT) associated with it that indicates whether or not any
data has been entered into the field.
Whenever format mode gets turned on (enabled), the MDTs
for all fields in the form are automatically set "off". The
entry of any valid characters into a field automatically sets
the MDT for that field to "on". When one or more fields are
cleared through the keyboard
(rmB
or.), the MDTs for
the affected fields are set "on". When one or more fields are
cleared programmatically «ESC>J or<ESC>K), however, the
MDTs for the affected fields are set "off".
In the Terminal Configuration menu, there is a field
labeled "TRANSMI T" which specifies whether all fields in the
form or only those fields which have been modified are to be
transmitted to the host computer when the operator in-
itiates a data transfer (using the. key, for example). If
TRANSMIT=Modi
fi
ed F i el d5, then only those fields whose
MDTs are set "on" are transmitted to the host computer. If
TRANSM IT=A
11
F iel d5, then all fields in the form are trans-
mitted to the host computer regardless of how their MDTs
are set.
TRANSFERRING FORM STRUCTURES
FROM THE SCREEN
TO A HOST COMPUTER
When writing application programs that will display a
form structure on the terminal's screen, you may, of course,
code the PRINT statements that issue the necessary escape
sequences, <SI > codes, <SO> codes, and data. For complex
form structures, however, this can be both tedious and very
prone to error.
An easier method is to design the form at the terminal and
then transfer the form structure from the screen to the host
computer where it can be accessed by or incorporated into
your application programs. If the terminal is connected to
an HP 3000 Computer System, you may use the
FORMSPEC portion of V/3000 to do so and then include
appropriate V/3000 intrinsic calls in your application pro-
gram to use the form in the run-time environment.
5-9

Advertisement

Table of Contents
loading

Table of Contents