I got an example working.
Copy termtable.txt and smgterms.txt from sys$system to current directory.
Edit termtable.txt to include putty.txt.
Clone VT500 from smgterms.txt to PUTTY in putty.txt and change USER1 strings.
And you are ready to go.
Code: Select all
$ type termtable.txt
REQUIRE 'SMGTERMS' ! contains definitions for DEC terminals
require 'putty'
$ sear putty.txt "name = ","_user1 ="
NAME = "PUTTY"
begin_user1 = "$[34;41m", end_user1 = "$[0m",
$ mcr smgbldtrm
$ define/nolog term$tabloc sys$disk:[]
$ set term/dev=putty
$ type color.for
program color
implicit none
include '($smgdef)'
integer*4 stat, vdisp, pb, dummy
integer*4 smg$create_virtual_display, smg$create_pasteboard,
+ smg$paste_virtual_display,
+ smg$set_cursor_abs, smg$put_line,
+ smg$delete_virtual_display, smg$delete_pasteboard
stat = smg$create_virtual_display(3, 78, vdisp, smg$m_border)
stat = smg$create_pasteboard(pb)
stat = smg$paste_virtual_display(vdisp, pb, 2, 2)
stat = smg$set_cursor_abs(vdisp, 2, 2)
stat = smg$put_line(vdisp, 'aa')
stat = smg$set_cursor_abs(vdisp, 2, 4)
stat = smg$put_line(vdisp, 'bb', 1, smg$m_bold)
stat = smg$set_cursor_abs(vdisp, 2, 6)
stat = smg$put_line(vdisp, 'cc', 1, smg$m_underline)
stat = smg$set_cursor_abs(vdisp, 2, 8)
stat = smg$put_line(vdisp, 'dd', 1, smg$m_reverse)
stat = smg$set_cursor_abs(vdisp, 2, 10)
stat = smg$put_line(vdisp, 'ee', 1, smg$m_user1)
stat = smg$delete_virtual_display(vdisp)
stat = smg$delete_pasteboard(pb)
end
$ for color
$ link color
$ run color
And 'ee' is blue text on red background.
Sorry for using Fortran and not Cobol, but I am better at Fortran than Cobol and the code itself is not so relevant for the point.