Using [] in z/OS ISPF & emulators

Discussion in 'C Programming' started by John, Jul 19, 2006.

  1. John

    John Guest

    Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
    they've done to get brackets ( [] ) recognized by both their terminal
    emulator and ISPF itself.

    I'm using Attachmate Extra & even though I've mapped my keyboard for
    brackets, they end up translated to strange characters in ISPF. I'm able to
    type a bracket & it shows up as such on the screen, but once I hit enter, it
    gets translated into some strange character.

    I guess this is more of a mainframe hardware question, but there aren't any
    active mainframe groups that I could find...
     
    John, Jul 19, 2006
    #1
    1. Advertising

  2. John

    Dann Corbit Guest

    "John" <> wrote in message
    news:Dvwvg.55594$...
    > Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
    > they've done to get brackets ( [] ) recognized by both their terminal
    > emulator and ISPF itself.


    I do most of my editing on the PC side of the fence and then transfer the
    files.
    Frequently, I build on the PC too, with the SAS/C cross compiler.

    > I'm using Attachmate Extra & even though I've mapped my keyboard for
    > brackets, they end up translated to strange characters in ISPF. I'm able
    > to type a bracket & it shows up as such on the screen, but once I hit
    > enter, it gets translated into some strange character.
    >
    > I guess this is more of a mainframe hardware question, but there aren't
    > any active mainframe groups that I could find...


    news:bit.listserv.ibm-main
     
    Dann Corbit, Jul 19, 2006
    #2
    1. Advertising

  3. "John" <> writes:
    > Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
    > they've done to get brackets ( [] ) recognized by both their terminal
    > emulator and ISPF itself.


    One workaround is to use trigraphs. ??( is translated to [, and ??)
    is translated to ]. This happens in an early translation phase, so
    the translation occurs even in character constants and string
    literals. The drawback of trigraphs is that they're ugly (and their
    mother dresses them funny). You might need a compiler option to tell
    your compiler to recognize them.

    Or you can use digraphs. <: is equivalent to [, and :> is equivalent
    to ], assuming your compiler supports them. (Trigraphs were added in
    the 1989 ANSI C standard; I think digraphs were added in an amendment
    in 1995). They're slightly (but only slightly) less ugly than
    trigraphs, and they're handled in a later translation phase, so the
    string literal "<:" still consists of two characters, '<' and ':'.

    Or you can use some system-specific solution that I know nothing
    about. (Dann Corbit suggested asking in bit.listserv.ibm-main.)

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Jul 19, 2006
    #3
  4. John said:

    > Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
    > they've done to get brackets ( [] ) recognized by both their terminal
    > emulator and ISPF itself.


    Not saying it's the best solution, but when I faced this problem (about a
    million years ago now, but never mind that) I found out that EBCDIC did
    have a couple of characters that do the job, but unfortunately they're not
    the "right" ones, in that they are not the characters that an ASCII-EBCDIC
    conversion program replaces [] with. So I mucked around a bit with some
    test programs, and discovered the values of characters which, when
    translated into EBCDIC, would get translated into the "right" [ and ].

    I then wrote another program, which would simply copy its input to its
    output, except that whenever it saw a [ or a ], it would instead write out
    the appropriate magic value such that, when the program was copied up to
    the mainframe and translated into EBCDIC, the conversion would result in a
    useful translation.

    Sorry I can't remember the codes involved, but if takes you as much as an
    hour to write the necessary test programs, I'd be surprised.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, Jul 19, 2006
    #4
  5. John

    David Wade Guest

    "John" <> wrote in message
    news:Dvwvg.55594$...
    > Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
    > they've done to get brackets ( [] ) recognized by both their terminal
    > emulator and ISPF itself.
    >


    This can be tricky.

    > I'm using Attachmate Extra & even though I've mapped my keyboard for
    > brackets, they end up translated to strange characters in ISPF. I'm able

    to
    > type a bracket & it shows up as such on the screen, but once I hit enter,

    it
    > gets translated into some strange character.
    >


    The original IBM screens did not have "[" or "]" keys. There are two places
    in the EBCDIC code table where these can occur.
    0xAD/0xBD or 0xA0/0xB if I recall properly. Usually you can set a choice of
    code pages in 3270 emulators. I found that in IBM PC COmms I needed to use
    code page 1047....

    > I guess this is more of a mainframe hardware question, but there aren't

    any
    > active mainframe groups that I could find...
    >
    >


    NO, but there are e-mail lists which get gated to USENET....
     
    David Wade, Jul 19, 2006
    #5
  6. David Wade said:

    <snip>
    >
    > The original IBM screens did not have "[" or "]" keys. There are two
    > places in the EBCDIC code table where these can occur.
    > 0xAD/0xBD


    Dem's der bunnies! I'd know 'em anywhere!

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
     
    Richard Heathfield, Jul 20, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Prothman [MVP]

    Re: EMULATORS

    Carl Prothman [MVP], Jul 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,027
    Carl Prothman [MVP]
    Jul 23, 2003
  2. Aisha

    EMULATORS

    Aisha, Jul 21, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    490
    Aisha
    Jul 21, 2003
  3. Chumley Walrus
    Replies:
    1
    Views:
    466
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=
    Dec 31, 2004
  4. Nathan Sokalski
    Replies:
    2
    Views:
    616
    Cowboy \(Gregory A. Beamer\)
    May 18, 2009
  5. Nathan Sokalski
    Replies:
    2
    Views:
    1,089
    Cowboy \(Gregory A. Beamer\)
    May 18, 2009
Loading...

Share This Page