Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Using [] in z/OS ISPF & emulators

Reply
Thread Tools

Using [] in z/OS ISPF & emulators

 
 
John
Guest
Posts: n/a
 
      07-19-2006
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...


 
Reply With Quote
 
 
 
 
Dann Corbit
Guest
Posts: n/a
 
      07-19-2006
"John" <(E-Mail Removed)> wrote in message
newsvwvg.55594$(E-Mail Removed). ..
> 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


 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      07-19-2006
"John" <(E-Mail Removed)> 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.velocityreviews.com/forums/(E-Mail Removed) <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.
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      07-19-2006
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)
 
Reply With Quote
 
David Wade
Guest
Posts: n/a
 
      07-19-2006

"John" <(E-Mail Removed)> wrote in message
newsvwvg.55594$(E-Mail Removed). ..
> 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....


 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      07-20-2006
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)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging ASP.NET Web Applications Using Visual Studio 2008's Device Emulators Nathan Sokalski ASP .Net Mobile 2 05-18-2009 05:39 PM
Debugging ASP.NET Web Applications Using Visual Studio 2008's Device Emulators Nathan Sokalski ASP .Net 2 05-18-2009 05:39 PM
Special Characters in ISPF Panels Murali Alagiri Computer Support 0 09-29-2004 06:17 AM
Any router emulators do SVI (Cat 35xx like)? Ron Wood Cisco 0 11-14-2003 02:08 AM
Re: EMULATORS Carl Prothman [MVP] ASP .Net 0 07-23-2003 06:30 PM



Advertisments