7

I've been using a remote terminal connected to USS under a mainframe for some time. Is there a way to configure this terminal to be colored?

I'm using PuTTY and xterm.

Added: USS stands for UNIX System Services, UNIX implementation for mainframes.

tcb
  • 171
  • 4

2 Answers2

6

It's doable, but you would have to do some work. Referring to z/OS UNIX System Services and UNIX System Services User's Guide gives no clues.

However, Customizing the terminfo database says

Full-screen application programs such as the vi editor and the more utility require a terminfo database. The terminfo database contains the characteristics of different terminal types that are used to run these full-screen applications.

The terminfo database is shipped as part of z/OS UNIX System Services Application Services. The database is populated with the terminal types defined by ibm.ti, dec.ti, wyse.ti, ansi.ti, and dtterm.ti. The database is in the directory /usr/share/lib/terminfo and the source files are in /samples.

If you need to define other terminal or workstations for a terminfo database, see Steps for defining terminals or workstations for a terminfo database.

which (for the unwary) might sound good, e.g., "ansi". The examples given date from the early 1990s however, and do not reflect much of PuTTY's behavior. If you ignore the function keys and just sort-of-want color in your prompt (no bash listed...), then doing

setenv TERM ansi

in tcsh "should" work. For something closer, you might try exporting the text description on some other system

infocmp putty >foo

and on zOs

tic foo

and use

setenv TERM putty

It is not required for certification as far as I know, but zOS provides an X/Open Curses implementation similar to the other Unix systems (and ncurses). But you should plan on bringing your own terminal descriptions. Further reading:

For example (ncurses of course):

$ infocmp putty
#       Reconstructed via infocmp from file: /usr/local/ncurses/share/terminfo/p/putty
putty|PuTTY terminal emulator,
        am, bce, bw, ccc, hs, mir, msgr, xenl, xon,
        colors#8, it#8, ncv#22, pairs#64,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
        dch=\E[%p1%dP, dch1=\E[P,
        dispc=%?%p1%{8}%=%t\E%%G\342\227\230\E%%@%e%p1%{10}%=%t\E%%G\342\227\231\E%%@%e%p1%{12}%=%t\E%%G\342\231\0\E%%@%e%p1%{13}%=%t\E%%G\342\231\252\E%%@%e%p1%{14}%=%t\E%%G\342\231\253\E%%@%e%p1%{15}%=%t\E%%G\342\230\274\E%%@%e%p1%{27}%=%t\E%%G\342\206\220\E%%@%e%p1%{155}%=%t\E%%G\340\202\242\E%%@%e%p1%c%;,
        dl=\E[%p1%dM, dl1=\E[M, dsl=\E]0;\007, ech=\E[%p1%dX,
        ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
        flash=\E[?5h\E[?5l, fsl=^G, home=\E[H, hpa=\E[%i%p1%dG,
        ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
        indn=\E[%p1%dS,
        initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
        is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R,
        kLFT=\E[D, kRIT=\E[C, kb2=\E[G, kbs=\177, kcbt=\E[Z,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kend=\E[4~, kf1=\E[11~, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
        kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
        kf19=\E[33~, kf2=\E[12~, kf20=\E[34~, kf3=\E[13~,
        kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
        kf9=\E[20~, khome=\E[1~, kich1=\E[2~, kind=\E[B,
        kmous=\E[M, knp=\E[6~, kpp=\E[5~, kri=\E[A, kspd=^Z,
        nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
        rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E[?47l,
        rmir=\E[4l, rmkx=\E[?1l\E>, rmpch=\E[10m, rmso=\E[27m,
        rmul=\E[24m,
        rs2=\E<\E["p\E[50;6"p\Ec\E[?3l\E]R\E[?1000l,
        s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sc=\E7,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?47h,
        smir=\E[4h, smkx=\E[?1h\E=, smpch=\E[11m, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n,
        u8=\E[?6c, u9=\E[c, vpa=\E[%i%p1%dd,

and

$ infocmp ansi
#       Reconstructed via infocmp from file: /usr/local/ncurses/share/terminfo/a/ansi
ansi|ansi/pc-term compatible with color,
        am, mc5i, mir, msgr,
        colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J,
        cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B,
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
        cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
        dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
        el1=\E[1K, home=\E[H, hpa=\E[%i%p1%dG, ht=\E[I, hts=\EH,
        ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J,
        indn=\E[%p1%dS, invis=\E[8m, kbs=^H, kcbt=\E[Z, kcub1=\E[D,
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, kich1=\E[L,
        mc4=\E[4i, mc5=\E[5i, nel=\r\E[S, op=\E[39;49m,
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rin=\E[%p1%dT,
        rmacs=\E[10m, rmpch=\E[10m, rmso=\E[m, rmul=\E[m,
        s0ds=\E(B, s1ds=\E)B, s2ds=\E*B, s3ds=\E+B,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
        sgr0=\E[0;10m, smacs=\E[11m, smpch=\E[11m, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n,
        u8=\E[?%[;0123456789]c, u9=\E[c, vpa=\E[%i%p1%dd,

The question did not clarify if xterm is running on zOS, or being used from some other system. If it is running on zOS, it would be interesting to know more about it.

Morag Hughson
  • 171
  • 1
  • 6
Thomas Dickey
  • 75,040
  • 9
  • 171
  • 268
0

PuTTY definitely is capable of emulating a color xterm, but the applications on the host (mainframe) have to be aware of this capability. It's possible that termcap or terminfo definition of xterm on your mainframe does not include AF (setaf) capability.

sendmoreinfo
  • 2,533
  • 21
  • 36