CA Ramis determine 'SCREEN' within SBX procedure


Article ID: 49716


Updated On:


Ramis Reporter


How can I determine the 'SCREEN' setting from within my Ramis SBX procedure?


I need to determine whether it is 'SCREEN ON' or 'SCREEN OFF' for my SBX procedure processing logic.


Release:  7.4

CA Ramis
CA Ramis Reporter


The CA Ramis SBX variable %TERMINAL provides the value of the screen setting.

From the CA Ramis System Building Executive (SBX) publication, section 9.2.1 Identifying the Operating Mode:

The %TERMINAL system variable identifies the operating mode (batch or interactive), and, if the mode is interactive,
the terminal type to which RAMSYSIN is directed.
Possible values are: 
The %TERMINAL variable is set by CA Ramis. 
Value Mode or Terminal 
----- ---------------- 
0 Batch. 
1 Teletype or video display terminal without Screen Manager. 
2 Model 2 (24x80) video display terminal. 
3 Model 3 (32x80) video display terminal. 
4 Model 4 (43x80) video display terminal. 
5 Model 5 (27x132) video display terminal. 

So, you can test the value of %TERMINAL in your SBX procedure during execution.

The value 1 indicates that this SBX procedure is executing with SCREEN OFF, the value 0 indicates that this is running in batch, and values 2-5 indicate that this is running with SCREEN ON and what terminal type is running on.

Additional Information

The CA Ramis System Building Executive (SBX) publication can found via the CA Ramis Version 7.4 set of documentation at CA Ramis Bookshelves and PDFs