SeeView Manual

SeeView Directives
HP NonStop SeeView Manual526355-004
8-2
PROCEDURE
PROCEDURE
The ?PROC directive identifies a block of SeeView statements that you can execute
with a CALL statement.
The lines of text following the ?PROC procedure-name directive represent SeeView
statements associated with procedure-name. Another directive, or end of file,
marks the end of the procedure.
Example 8-1. Example of MENU Directive
?MENU items
{---------}
Dates <== CALL dates { call parm = ""
Today <== CALL dates ("today") { call parm = "today"
January <== CALL dates ( "1/1" ) { call parm = "1/1"
February <== CALL dates ( "2/1" ) { ..
March <== CALL dates ( "3/1" )
April <== CALL dates ( "4/1" )
May <== CALL dates ( "5/1" )
..
December <== CALL dates ("12/1" )
[ ? ]<==? CALL dates (#menuinput) {
?PROC DATES { #cmd }
{------------------}
{ if #cmd ="" popup dates menu
{ if #cmd<>"" then "text" in #cmd implies do that DATES "text"
{-----------------------------------------------------------------------}
PARM #cmd; { call parm stored in #cmd
TASK dates; { assert dates process
IF #taskstart THEN BEGIN { if task was just started then
WRITE dates,"months 2"; { initialize process by writing
WRITE dates,"term zentec"; { various command parameters to it
WRITE dates,"int pagelines 19";
END;
IF #cmd="" THEN BEGIN { if #cmd="" implies popup dates menu
BELOW; CLEARW; { erase windows below current menu
WINDOW [] MENU CACHE/today/ FOR 14;{ popup menu on months of year
RETURN; { return control to clicker
END;
IF #cmd="today" THEN #cmd:=#date[4:8];{ set #cmd to todays date in #date
BESIDE; { popup a Dates window beside menu with
WINDOW dates, "dates " & #cmd { the command to Dates being "DATES "&
NOCURSOR NOFRAME; { #cmd. Don't move cursor/redraw frame.
?SECT ShowMenus
{-------------}
{ Show initial base menus
{------------------------}
VAR h := 3; {default front page menu height
VAR w := 13; {menu width
PAGE 1;
WINDOW items MENU CACHE/dates/ SIZE w,h HEAD "Calendar";
?PROC procedure-name