SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-8
ACCEPT
Examples
This example reads the input data associated with the name, address, and phone
menu fields into the local string variables #name, #address, and #phone and then
inserts this input into an SQL table using the SQL conversational interface (SQLCI):
This menu data is read in a single input operation with the ACCEPT statement in the
preceding example:
?MENU person
{-----------}
Name [John Doe ]<==?
Address [100 Main, Plaines, IL ]<==?
Phone [901-555-5555 ]<==?
*
?PROC GetPerson
{--------------}
LINE #menuline,#menucol; {Define menu area for accept.
VAR #name, #address, #phone; {Declare vars to accept into.
ACCEPT #name, #address, #phone; {Accept into string vars.
TASK sqlci;
BELOW; {Sqlci window below input menu
WINDOW sqlci, "INSERT INTO PERSON (*) VALUES (" &
"'" & #name & "',"
"'" & #address & "',"
"'" & #phone & "');"
?SECT GetPersonMain
{------------------}
LINE 4;
WINDOW person MENU "call GetPerson" { Call accept proc.
CACHE FIRST UNTIL /*/ SIZE 35 { Size menu.
GLASS; { GLASS required!!