HP 3000 Manuals

VSETKEYLABELS [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

VSETKEYLABELS 

Allows for temporarily setting, programmatically, labels for function
keys.

Syntax 

             VSETKEYLABELS {comarea,formorglob,numoflabels,labels}

Parameters 

comarea          Must be comarea name specified when the forms file was
                 opened with VOPENFORMF. If not already set, the
                 following comarea items must be set before calling
                 VSETKEYLABELS:

                 cstatus          Set to zero.

                 language         Set to the code identifying the
                                  programming language of the calling
                                  program.

                 comarealen       Set to total number of two-byte words
                                  in comarea.

                 VSETKEYLABELS may set the following comarea items:

                 cstatus          Set to nonzero value if call is
                                  unsuccessful.

formorglob       Integer specifying which type of labels are to be
                 temporarily replaced.

                   0 - Replace global labels.
                   1 - Replace current form labels.

numoflabels      Integer from 0 through 8 indicating how many labels are
                 to be temporarily set, where 0 indicates that the labels
                 defined in FORMSPEC should be used.

labels           A byte array in which the labels are defined.  The
                 length of the array must be at least numoflabels * 16.

Discussion 

VSETKEYLABELS is only a temporary setting of new labels for the function
keys.  Use of it does not change the label definitions made in FORMSPEC.
The labeloption must be set to one prior to VOPENFORMF.

The temporary labels are displayed after the next call to VSHOWFORM. If
the temporary labels are global, they remain active until the forms file
is closed or replaced by new global labels.  If the temporary labels are
current form labels, they are replaced when the next form is retrieved or
when new current form labels are set.

If no global or current form labels have been defined with FORMSPEC or no
labels have been set with a prior call to VSETKEYLABELS, the key label
buffers are cleared before the labels currently being defined are set.

Example 

COBOL

          77 FORM-OR-GLOB     PIC S9(4)COMP.
          77 NUM-OF-LABELS    PIC S9(4)COMP.
          77 KEY-LABELS       PIC X(32).
             :
          MOVE 1 TO FORM-OR-GLOB.
          MOVE 2 TO NUM-OF-LABELS.
          MOVE "LABEL       1     LABEL     2     " TO KEY-LABELS.
          CALL "VSETKEYLABELS" USING COMAREA,FORM-OR-GLOB,NUM-OF-LABELS,KEY-LABELS.

BASIC

          10 INTEGER F,N
          20 DIM L$[32]
          30 F=1
          40 N=2
          50 L$="LABEL      1  LABEL     2     "
          60 CALL VSETKEYLABELS(C[*],F,N,L$)

FORTRAN

          INTEGER FORMORGLOB,NUMLABELS
          CHARACTER*32 LABELS
          FORMORGLOB=1
          NUMLABELS=2
          LABELS="LABEL     1     LABEL     2      "
          CALL VSETKEYLABELS(COMAREA,FORMORGLOB,NUMLABELS,LABELS)

SPL/PASCAL

          INTEGER
            FORM'OR'GLOB,
            NUM'OF'LABELS;
          BYTE ARRAY
            LABELS(0:31);
             :
          FORM'OR'GLOB:=1;
          NUM'OF'LABELS:=2;
          MOVE LABELS:="LABEL     1    LABEL   2     ";
          VSETKEYLABELS(COMAREA'FORM'OR'GLOB,NUM'OF'LABELS,LABELS);



MPE/iX 5.0 Documentation