Previous Next

TERMINAL statement
Changes terminal type during program execution. On UNIX, changes the value of the TERM environment variable.
Note:
Syntax 
 
TERMINAL = termid 
termid
A terminal type string. The termid can also be an expression. The AVM returns an error message if termid is not defined in the PROTERMCAP file. However, termid can be the word TERMINAL. The line TERMINAL=TERMINAL reinitializes the terminal.
Example 
This procedure changes the terminal screen width from 80 columns to 132 columns, then back again:
 
FOR EACH Customer NO-LOCK:
  DISPLAY Customer.
END.
 
TERMINAL = "wy60w".
OUTPUT TO TERMINAL PAGED.
FOR EACH Customer NO-LOCK:
  DISPLAY Customer WITH WIDTH 132.
END.
 
OUTPUT CLOSE.
TERMINAL = "wy60".
DISPLAY "Back to 80 columns." WITH CENTERED.
Notes 
*
*
*
The following sequence of statements does not work as intended, because subp.p is not recompiled before its second execution:
 
TERMINAL = "wy60w".
RUN subp.p.
 
TERMINAL = "wy60".
RUN subp.p.
 
DISPLAY "Frame (132) too big for screen (80)" WITH CENTERED.
See also 
TERMINAL function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.