SeeView Manual
SeeView Language Elements
HP NonStop SeeView Manual—526355-004
5-24
Updating Fields
•
Enter a string variable name in a field to display that variable’s value in the field
when a window displays that field with the FIELDS option. For example, the
Address field in Example 5-11 displays “500 West Main”, the value of the variable
#address, when the WINDOW statement in the ?SECT main is executed.
•
Use the DISPLAY statement FROM option to update fields with data contained in
another cache. For example, the City, State, Zip fields in Example 5-11 are updated
with the statement:
DISPLAY FIELD 3 FROM CityStateZip;
When the script in Example 5-11 is invoked:
•
?MENU Person defines the input-output screen image for the Person screen. The
text “John” and #address are copied into the cache along with the rest of the
screen images.
•
?MENU CityStateZip stores the city, state, and zip code in a cache named
CityStateZip.
•
?SECT Main declares a variable named #address and initializes that variable to a
value of “500 West Main.” A window is displayed on the Person cache as shown in
Figure 5-8. When the window is displayed, the text “John” is displayed in the First
name field and the text “500 West Main” is displayed in the Address field.
The statement DISPLAY “Smith” updates the Last name field with the text “Smith.” A
list of string expressions is also acceptable. This example would also result in the
display shown in Figure 5-8:
DISPLAY "Smith","John","500 West Main","Chicago","IL","60172"
Example 5-11. Example of Various Field Update Techniques
?MENU Person
{-----------}
Last [ ] First [John ] :: (alpha) (alpha)
(1)
Address [#address ] (3)
City [ ] State[ ] Zip[ ] :: (a) (a) (n notab)
*
?MENU CityStateZip
{-----------------}
Chicago
IL
60172
?SECT Main
{---------}
VAR #address := "500 West Main";
WINDOW person FIELDS (u) CACHE UNTIL "*" SIZE 42 ;
DISPLAY "Smith";
(2)
DISPLAY FIELD 3 FROM CityStateZip;
(4)