HP 3000 Manuals

HPDSEND [ High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual ] MPE/iX 5.0 Documentation


High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual

HPDSEND 

Gets a form and displays it on the screen.

Syntax 

HPDSEND globalpak, returnpak, sendpak, formpak, cursorposition, msg, 
datadescrpt, databuf, labeldescrpt, labelbuf 

Parameter Descriptions 

globalpak                 A compound parameter that passes information
                          between intrinsics.  For a complete description
                          of this parameter, see "Global Parameters" in
                          Chapter 3.

returnpak                 A compound parameter that passes information
                          back from the intrinsic to the application.
                          For a complete description of this parameter,
                          see "Global Parameters" in Chapter 3.

sendpak                   A compound parameter that modifies the default
                          operations of HPDSEND. It is made up of the
                          following subparameters:

                          dontenableinput           A four-byte integer
                                                    that is used by the
                                                    application to
                                                    indicate that you
                                                    want to make
                                                    consecutive calls to
                                                    HPDSEND. Use this
                                                    parameter if, for
                                                    example, your
                                                    application displays
                                                    a header, and then
                                                    appends a detail
                                                    form.  This insures
                                                    that no data can be
                                                    entered until the
                                                    entire screen is
                                                    displayed,
                                                    eliminating the
                                                    possibility of
                                                    corrupting the screen
                                                    display.

                                                    The values you can
                                                    specify are:

                                                    0 = ignore
                                                    1 = do not enable
                                                    device to take
                                                    operator's input;
                                                    keeps a locked device
                                                    from being unlocked.

                          windowenh                 An eight-byte
                                                    character array that
                                                    updates the window
                                                    line enhancement.  If
                                                    the array contains
                                                    all spaces or binary
                                                    zeros, the current
                                                    window enhancement is
                                                    used.  If the array
                                                    contains "NONE" left
                                                    justified, the window
                                                    is displayed without
                                                    enhancement.  If you
                                                    do not supply either
                                                    of these values for
                                                    the array, you can
                                                    specify the following
                                                    values in any
                                                    combination:

                                                    I = inverse video

                                                    H = half bright -
                                                    this has no effect
                                                    unless inverse video
                                                    is on.

                                                    U = underlined

                                                    B = blinking

                          bypassfeature             A four-byte integer
                                                    used by the
                                                    application to
                                                    indicate the features
                                                    you do not want
                                                    HPDSEND to use.  The
                                                    values you can
                                                    specify are:

                                                    0 = ignore

                                                    1 or 3 = do not
                                                    initialize fields
                                                    with form
                                                    specifications.

                                                    2 or 3 = do not force
                                                    the operator's data
                                                    display to be
                                                    refreshed.

formpak                   A compound parameter that acts as input to
                          HPDSEND. It provides HPDSEND with specific
                          information about displaying forms on the
                          operator's terminal screen.  It is made up of
                          the following subparameters:

                          formname                  A 32-byte character
                                                    array that names the
                                                    form to be displayed
                                                    on the user's device.
                                                    You can alternatively
                                                    specify one of two
                                                    formname tokens:
                                                    $REFRESH or
                                                    $PREDETERMINED.

                          $REFRESH is used to reinitialize the operator's
                          terminal.  It causes the following actions to
                          be performed:

                          - reset and reinitialize the terminal

                          - redisplay the last form at the home position
                          (top left corner of the screen)

                          - redisplay field data and enhancements

                          - redisplay window line contents and
                          enhancement

                          Use the $REFRESH token to implement a recovery
                          mechanism for terminal power failures.

                          $PREDETERMINED tells HPDSEND that your
                          application will use the form and form
                          positioning directive that are specified in the
                          forms file.  Alternately, the current form can
                          contain embedded processing instructions that,
                          when executed, determine which form to use next
                          and where to position it.

                          formposition              A four-byte integer
                                                    that tells HPDSEND
                                                    where to position the
                                                    form on the
                                                    operator's terminal
                                                    screen.  The values
                                                    you can specify are:

                                                    0 = home - clears the
                                                    device and positions
                                                    the form at the top
                                                    left of the screen

                                                    1 = overlay -
                                                    position at the
                                                    beginning of last
                                                    form.

                                                    2 = append - position
                                                    at end of last form

                                                    3 = freeze and append
                                                    - position at the end
                                                    of the last form
                                                    after the last form
                                                    is frozen.

                          chnglisttype              A four-byte integer
                                                    that is input to
                                                    HPDSEND. It tells
                                                    HPDSEND whether or
                                                    not to apply
                                                    application supplied
                                                    change specifications
                                                    to fields on the
                                                    form.  The values you
                                                    can specify are:

                                                    0 = field change list
                                                    is empty

                                                    1 = fields to change
                                                    are identified by
                                                    number

                                                    2 = fields to change
                                                    are identified by
                                                    name.

                          listcount                 A four-byte integer
                                                    that is input to
                                                    HPDSEND and tells it
                                                    the number of field
                                                    change entries in the
                                                    list.

                          chngentry                 Identifies the table
                                                    of entries defined in
                                                    your application.

                          fieldident                If you gave
                                                    chnglisttype a value
                                                    of 1, this four-byte
                                                    integer is input to
                                                    HPDSEND. A positive
                                                    value indicates field
                                                    number.  A negative
                                                    value indicates
                                                    screen order.

                                                    If you gave
                                                    chnglisttype a value
                                                    of 2, this 32-byte
                                                    character array is
                                                    input to HPDSEND. It
                                                    is the USASCII
                                                    character name of a
                                                    field.

                          chngtype                  A four-byte integer
                                                    that provides input
                                                    to HPDSEND about
                                                    field attributes to
                                                    be changed.  The
                                                    values you can
                                                    specify are:

                                                    -1 = do not change
                                                    field attributes

                                                    1 = toggle
                                                    enhancement attribute

                                                    2 = toggle field type
                                                    attribute

                                                    3 = toggle data type
                                                    attribute

                                                    4 = change
                                                    enhancement attribute

                                                    5 = change field type
                                                    attribute

                                                    6 = change data type
                                                    attribute

                                                    7 = toggle field
                                                    error enhancement
                                                    attribute.  This does
                                                    not return the
                                                    enhancement to the
                                                    application.

                                                    8 = change to field
                                                    error enhancement
                                                    attribute

                                                    Note:  For values 1,
                                                    2, and 3, toggle sets
                                                    the attributes to the
                                                    new value and returns
                                                    the old value to the
                                                    application.

                          chngspec                  An eight-byte
                                                    character array that
                                                    provides input to and
                                                    output from HPDSEND.
                                                    The chngspec values
                                                    allowed depend on the
                                                    value you give
                                                    chngtype:

                                                    If chngtype has a
                                                    value of 1 or 4,
                                                    chngspec values NONE
                                                    or any combination of
                                                    H, I, B, and U are
                                                    allowed.

                                                    If chngtype has a
                                                    value of 2 or 5,
                                                    chngspec values O, D,
                                                    P, and R are allowed.

                                                    If chngtype has a
                                                    value of 3 or 6,
                                                    chngspec values CHAR,
                                                    DIG, IMPn, NUM(n),
                                                    DMY, MDY, and YMD are
                                                    allowed.

                                                    If chngtype has a
                                                    value of 1, 2, or
                                                    3 (toggle
                                                    specifications), the
                                                    field specification
                                                    that was in effect
                                                    before the change
                                                    took place is
                                                    returned to the
                                                    application.

                                                    If chngtype has a
                                                    value of 7 or 8, the
                                                    content of chngspec 
                                                    is ignored.

See "Field Menu" in the VPLUS/V Reference Manual for definitions of the
above enhancements, field types, and data types.

cursorposition            A four-byte integer or a 36-byte array of
                          characters that identifies the field at which
                          the operator is to begin entering data.  It
                          also tells HPDSEND to position the cursor at
                          this field.  The field must be an input field.

                          A four-byte integer identifies the beginning
                          field by number or screen order.  A positive
                          integer indicates a field number.  A negative
                          integer indicates screen order.  If you supply
                          a zero, HPDSEND moves the cursor to the first
                          input field on the screen.

                          A 36-byte character array identifies the
                          beginning field by its USASCII name.  This
                          array must be preceded by a double backslash.
                          If you pass spaces in this array, HPDSEND moves
                          the cursor to the first input field on the
                          screen.

msg                       A compound parameter that tells HPDSEND the
                          message you want displayed in the message
                          window, and the length of that message.  It is
                          made up of the following subparameters:

                          msglen                    A four-byte integer
                                                    that indicates in
                                                    bytes the length of
                                                    the message you want
                                                    HPDSEND to transfer
                                                    to the window area.
                                                    If you supply a zero,
                                                    HPDSEND fills the
                                                    window with blanks.
                                                    If you supply a
                                                    negative number,
                                                    HPDSEND does not
                                                    update the window
                                                    area and the previous
                                                    message is displayed.

                          msgline                   A character array of
                                                    up to 256 bytes that
                                                    identifies the
                                                    message you want
                                                    HPDSEND to display in
                                                    the window area.

datadescrpt               A compound parameter that tells HPDSEND how
                          data is to be mapped when it is moved between
                          your application and data fields in the form.
                          There are six ways to map data.  The first and
                          simplest way is shown below.

                          -1 = do not transfer data

                          0 = moves concatenated string of data from
                          databuf.  The number of bytes moved is equal to
                          the sum of the lengths of all the fields in the
                          form.  All data is moved as type CHAR.

                          See Chapter 4 for a description of each of the
                          other five mapping methods.

databuf                   A record passed as input to HPDSEND that
                          represents the application area from which the
                          data is copied to fields on the form.

labeldescrpt              A compound parameter that identifies for
                          HPDSEND the key labels that your application
                          will update.  Function keys are labeled, by
                          default, with the label strings defined in the
                          forms file.  labeldescrpt is made up of the
                          following subparameters:

                          descrptcnt                A four-byte integer
                                                    that indicates the
                                                    number of labels to
                                                    be updated.

                          descrptentry              Identifies a table
                                                    defined in your
                                                    application.

                          labelident                A four-byte integer
                                                    that identifies the
                                                    key label number.

                          labelenh                  An eight-byte
                                                    character array that
                                                    will be used by a
                                                    future Hi-Li
                                                    enhancement to tell
                                                    HPDSEND to take the
                                                    "current
                                                    enhancement"; it is
                                                    not currently used by
                                                    HPDSEND. It is
                                                    recommended that you
                                                    set this variable to
                                                    spaces or binary
                                                    zeros.

OR 

                          labeldescrpt is made up of the following set of
                          subparameters:

                          labelset                  A 36-byte character
                                                    array specified by
                                                    double backslashes
                                                    followed by the
                                                    USASCII character
                                                    label set name.

                                                    Specifying (double
                                                    backslash)$RESET_FORM
                                                    tells Hi-Li to reset
                                                    function key labels
                                                    to the base set
                                                    specified for the
                                                    current form.  If a
                                                    label set was not
                                                    defined for the form,
                                                    Hi-Li uses the forms
                                                    file global set as
                                                    the base set.

                                                    Specifying spaces
                                                    tells Hi-Li to not
                                                    update the current
                                                    function key labels.

                          For a discussion of the labelset subparameter,
                          see the Discussion for HPDSEND that follows
                          these parameters.

labelbuf                  A byte array of characters that identifies for
                          HPDSEND the application area that contains the
                          label strings.  For the HP3000, 16 bytes are
                          sent to each label.

Discussion 

HPDSEND is one of the three core intrinsics that make up the screen
management intrinsics.  Its role is to establish the overall context for
an interactive transaction.  The context is established by getting the
form.  It determines the form's display position, initializes fields and
loads application data, places an application message in the message
window, displays the screen and key labels, and places the cursor at a
selected input field.

Parameters that are not required by your application can be compacted and
passed as abbreviated parameters.

Creating Function Key Label Sets Using LABELSET.  Because there is no
facility within FORMSPEC/V for defining free- floating function key label
sets, the HPDPROMPT and HPDSEND labelset, a subparameter of the
labeldescrpt parameter, provides this ability by "borrowing" the function
key label set from the form you specify in the labelset subparameter.

This form can be any of the "live" forms in the forms file or it can be a
"dummy" form which exists only as a place holder for the function key
label set.  You can create a place holder for a key label set by adding a
form to the forms file, defining a set of labels for the form, and
building a one-character, text-only, screen image for the dummy form.

Examples 

        COBOL:
                    01   formpak.
                         05  formname            pic x (32).
                         05  formposition        pic s9(8) comp.
                         05  chnglisttype        pic s9(8) comp.
                         05  listcount           pic s9(8) comp.
                         05  chngentry     occurs 5 times.
                             10  fieldident      pic x(32)
                             10  chngtype        pic s9(8) comp.
                             10  chngspec        pic s9(8).

                    01   labeldescrpt.
                         05  descrptcnt            pic s9(8) comp.
                         05  descrptentry  occurs 8 times.
                            10  labelident        pic s9(8) comp.
                            10  labelenh          pic x(8).

                    01   labelbuf.
                         05 labelentry  occurs 8 times.
                            10  labeltext        pic X(16).

        FORTRAN:
                    INTEGER*4        FORMPAK(44)
                    CHARACTER*32     FORMNAME
                    INTEGER*4        FORMPOSITION
                    INTEGER*4        CHNGLISTTYPE
                    INTEGER*4        LISTCOUNT
                    EQUIVALENCE (FORMPAK(1), FORMNAME),
                   +            (FORMPAK(9), FORMPOSITION),
                   +            (FORMPAK(10), CHNGLISTTYPE),
                   +            (FORMPAK(11), LISTCOUNT)
                        CHARACTER*44  FIELDIDENT(1,3)
                        EQUIVALENCE (FORMPAK(12), FIELDIDENT)
                        INTEGER*4     CHNGTYPE (11,3)
                        CHARACTER*4   CHNGSPEC (11,3)
                        EQUIVALENCE (FORMPAK(12)  CHNGTYPE),
                   +                 (FORMPAK(12), CHNGSPEC)

                    INTEGER*4 LABELDESCRPT (25)
                    INTEGER*4 DESCRPTCNT
                    EQUIVALENCE (LABELDESCRPT(1), DESRPTCNT)
                       INTEGER*4 LABELIDENT  (3,8)
                       CHARACTER*4 LABELENH (3,8)
                       EQUIVALENCE (LABELDESCRPT(3), LABELIDENT),
                                   (LABELDESCRPT(3), LABELENH)

For an example of how a record structure can be manipulated in FORTRAN,
see the COLLECT_TXNS subroutine in the FORTRAN example program in
Appendix C.

                    INTEGER*4      LABELBUF(32)
                    CHARACTER*16   LABELTEXT(1,8)
                    EQUIVALENCE  (LABELBUF(1), LABELTEXT)

        Pascal:
                    type
                      chngentry_rec = record
                        fieldident      : packed array [1..32] of char;
                        chngtype        : integer;
                        chngspec        : packed array [1..8] of char;
                          end;

                    formpak_rec = record
                      formname        : packed array [1..32] of char;
                      formposition    : integer;
                      chnglisttype    : integer;
                      listcount       : integer;
                      chngentry       : array [ 1..5] of chngentry_rec;
                        end;

                    var
                      formpak           : formpak_rec

                    type
                      descrptentry_rec = record
                        labelident        : integer;
                        labelenh          : packed array [1..8] of char;
                          end;

                    labeldescrpt_rec = record
                      descrptcnt        : integer;
                      descrptentry      : array [1..8] of
                                       descrptentry_rec;
                        end;

                    var
                      labeldescrpt        : labeldescrpt_rec;

                    type
                      labelbuf_rec = record
                        labeltext     : array [1..8] of
                                        packed array [1..16] of char;

                    var
                      labelbuf        : labelbuf_rec;



MPE/iX 5.0 Documentation