HP3000-L Archives

December 1996, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Therm-O-Link <[log in to unmask]>
Reply To:
Therm-O-Link <[log in to unmask]>
Date:
Thu, 12 Dec 1996 10:32:27 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
On Wed, 11 Dec 1996 16:59:45 -0700, Curt Brimacomb <[log in to unmask]> writes:

>Hey cobol gurus!
>
>I have a programmer here who (in cobol) want to be able to send escape
>sequences using the hex code for it.  He knows decimal (pic s9(4) comp value
>27) and octal (pic x value %33).
>
>Can anyone tell me how to do it?  Or is it not something HP cobol can do?
>
>TIA...

Curt:

In Cobol, I have always defined each individual escape sequence like this:

    3.8        05  CLEAR-SCREEN.
    3.9            10  FILLER              PIC  X      VALUE %33.
    4              10  FILLER              PIC  X      VALUE "h".
    4.1            10  FILLER              PIC  X      VALUE %33.
    4.2            10  FILLER              PIC  X      VALUE "J".
    4.3        05  POSITION-CURSOR.
    4.4            10  FILLER              PIC  X      VALUE %33.
    4.5            10  FILLER              PIC  XX     VALUE "&a".
    4.6            10  PC-COL              PIC  99.
    4.7            10  FILLER              PIC  X      VALUE "c".
    4.8            10  PC-ROW              PIC  99.
    4.9            10  FILLER              PIC  X      VALUE "R".
    5          05  INVERSE-ON.
    5.1            10  FILLER              PIC  X      VALUE %33.
    5.2            10  FILLER              PIC  XXX    VALUE "&dJ".
    5.3        05  INVERSE-OFF.
    5.4            10  FILLER              PIC  X      VALUE %33.
    5.5            10  FILLER              PIC  XXX    VALUE "&d@".
    5.6        05  SCREEN-OFF.
    5.7            10  FILLER              PIC  X      VALUE %33.
    5.8            10  FILLER              PIC  X(5)   VALUE "&w13F".
    5.9        05  SCREEN-ON.
    6              10  FILLER              PIC  X      VALUE %33.
    6.1            10  FILLER              PIC  X(5)   VALUE "&w12F".
    6.2        05  FKEYS-OFF.
    6.3            10  FILLER              PIC  X      VALUE %33.
    6.4            10  FILLER              PIC  XXX    VALUE "&j@".
    6.5        05  FKEYS-ON.
    6.6            10  FILLER              PIC  X      VALUE %33.
    6.7            10  FILLER              PIC  XXX    VALUE "&jB".

Then, when I want to enable a certain escape sequence, I use:

    DISPLAY SCREEN-ON.

    . . .

    DISPLAY FKEYS-ON.

    . . .

    MOVE 00 TO PC-COL
    MOVE 10 TO PC-ROW
    DISPLAY POSITION-CURSOR

If you're using FWRITE's to the terminal instead of DISPLAY's, you can just
move the escape sequence to the record buffer and FWRITE it.

Hope this helps.

Jim Phillips                            Manager of Information Systems
E-Mail: [log in to unmask]      Therm-O-Link, Inc.
Phone: (330) 527-2124                   P. O. Box 285
  Fax: (330) 527-2123                   Garrettsville, Ohio  44231

ATOM RSS1 RSS2