glinkw
 
    Facebook

Fill out this form to subscribe to news, tips and information about updates.

Read more
Follow us
Facebook    Twitter    LinkedIn

G&R » About G&R » News » Glink as a GCOS8 console (tip)  

Glink as a GCOS8 console (tip)

Many Glink users are busy with their day to day work, and don't have the time to find interesting features.

This tip is about use of Glink as a GCOS8 console. If you have any tips that you think might be useful to other Glink users, please send them to us for consideration.

The GCOS8 console function was previously implemented on the Service Processor (SP console). The console output is plain text, but the application on the Service Processor sees specific text strings and then makes such lines various colors depending on the text found. Operations people appreciated the emphasis, and miss the coloring when they move to new systems, using a terminal as the console output device.

If Glink is your console terminal you can restore the message coloring using a very simple Glink 'on-line' script. Note that the triggering of script action that is here used to color the text line could do anything at all. We had one case where certain very serious output messages on a console were used to trigger a Glink script function that sent a message to the operators beeper (at a time when beepers were popular, and you could reach them by e-mail. I haven't seen anyone doing the same kind of thing with SMS to cellphones yet).

A simple script for coloring console output:

* Definitions

Define 1 ScreenX
Define 2 ScreenY
Define 3 AtrChar

* set up screen patterns

:Start
Pattern !1 '     *SRT  '
Pattern !2 '     *EOJ  '
Pattern !3 '     *ABT  '
Pattern !4 '     *END  '
Pattern !5 '     *MEDIA--'
Pattern !6 '     MNT '
Pattern !7 '     DMT '

When !1 Goto SetBlue
When !2 Goto SetGreen
When !3 Goto SetRed
When !4 Goto SetRed
When !5 Goto SetYellow
When !6 Goto SetYellow
When !7 Goto SetYellow

* Wait for pattern to arrive

Abort None
Enable None
Online
Goto Start

* Set appropriate attribute character

:SetRed
Assign %AtrChar 'S'
Goto SetCol

:SetGreen
Assign %AtrChar 'G'
Goto SetCol

:SetBlue
Assign %AtrChar 'X'
Goto SetCol

:SetYellow
Assign %AtrChar 'Y'
Goto SetCol

:SetCyan
Assign %AtrChar 'C'
Goto SetCol

:SetMagenta
Assign %AtrChar 'V'
Goto SetCol

:SetYellow
Assign %AtrChar 'Y'
Goto SetCol

:SetWhite
Assign %AtrChar 'W'
Goto SetCol


* Display attribute in column 1 of same line

:SetCol
SubR %ScreenX ('000' $X) 3
SubR %ScreenY ('000' $Y) 3
Show ('^[[' %ScreenY '001f^[s' %AtrChar '^[[' %ScreenY %ScreenX 'f')
Goto Start
(c) Copyright 1982-2017 Gallagher & Robertson AS. Webmaster: webmaster@gar.no

URL: http://www.gar.no/about/news/2005-05-20
 
PARTNERS