SeeView Manual

SeeView Language Elements
HP NonStop SeeView Manual526355-004
5-22
Field Attribute Productions
When the program in Example 5-10 is invoked:
?MENU Person declares a cache named “Person” and stores the format of the
Person screen in that cache. Cache elements containing field attribute productions
( :: ) define the domain of acceptable input values for those fields.
?SECT Main is executed, and ?PROC PutPerson is called with a set of initial
values.
?PROC PutPerson receives the initial values for a person in its input parameters.
The procedure then declares a WINDOW on the Person cache with a default
production of “CALL GetInput” and with the FIELDS (underline) format option
specified. This WINDOW statement displays the input-output dialog box shown in
Figure 5-7
.
?PROC GetPerson ( #first, #last, #addr, #city, #st, #zip )
{--------------------------------------------------------}
PARM #first OUT, #last OUT, #addr OUT, { Declare parms
#city OUT, #st OUT, #zip OUT; { as output parms.
LINE #menuline, #menucol; { Address window
ACCEPT #first,#last,#addr,#city,#st,#zip;{ Accept fields
?MENU People { To store person data
?PROC GetInput
{------------}
VARIABLE #first, #last, #addr, #city, #st, #zip, #s;
CALL GetPerson( #first, #last, #addr, #city, #st, #zip );
#s[ 1] := #first;
#s[10] := #last; { Put person data
#s[22] := #city; { in people cache
#s[30] := #st & ", " & #zip;
PUSH #s ONTO people; { Display people window
BELOW; { below person window.
WINDOW people CACHE FIRST NOFRAME NOCURSOR NOSILL SIZE #MENUWIDTH;
?SECT Main
{---------}
CALL PutPerson("John", "Smith", { Display person
"500 Main Street", { window with
"Chicago","IL","60172"); { initial data.
Example 5-10. Example of Field Attribute Production Usage (page 2 of 2)