HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

486 AppendixA
SAMPLE PROGRAMS
PASCAL
{ Three of the fields in the form used by this application
need to be toggled from "display only" to "input allowed".
In order to do this, we first translate field names to
screen orders. }
{ Setup to retrieve screen order for three specified fields }
FIELDINFO.NUM_ENTRIES := 3;
FIELDINFO.ENTRY_LEN := 9; { Field name key and screen order }
FIELDINFO.FORM_NAME := ’DEDUCTION’;
FIELDINFO.FIELDENTRY [1].FIELD_NAME := ’BADGE_NUMBER’;
FIELDINFO.FIELDENTRY [1].SCREEN_ORDER := 8224; {ASCII blanks}
FIELDINFO.FIELDENTRY [2].FIELD_NAME := ’LAST_NAME’;
FIELDINFO.FIELDENTRY [2].SCREEN_ORDER := 8224; {ASCII blanks}
FIELDINFO.FIELDENTRY [3].FIELD_NAME := ’SUR_NAME’;
FIELDINFO.FIELDENTRY [3].SCREEN_ORDER := 8224; {ASCII blanks}
{ Set length of entire info buffer }
INFOBUFLEN
:= (FIELDINFO.NUM_ENTRIES * FIELDINFO.ENTRY_LEN) + 10;
VGETFIELDINFO (COMAREA,
FIELDINFO,
INFOBUFLEN);
IF COMAREA.CSTATUS <> 0 THEN
BEGIN
STOP_NOW := TRUE;
ERROR_LOCATION
: = ’**** procedure: Setup For Work - Field Info Retrieval’;
GET_ERROR_MESSAGE;
END;
END; { Translate field names to screen orders }
END; { Procedure Setup For Work }
BEGIN
{ Sample program outer block }
STOP_NOW := FALSE;
DONE_WITH_TRANSACTIONS := FALSE;
NBR_TXN_COLLECTED := 0;
SETUP_FOR_WORK;
WHILE (NOT (STOP_NOW))
AND (NOT (DONE_WITH_TRANSACTIONS)) DO
COLLECT_TRANSACTIONS;