IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

programming in "C" in z/OS


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ricardo Viegas

New User


Joined: 18 Oct 2012
Posts: 39
Location: Brasil

PostPosted: Thu Nov 01, 2012 4:52 am
Reply with quote

Just beginning to learn the "C" language and trying my very first (and simple) programs in that language in a z/OS-1.13.
Reasonable experience in programming (REXX, PL/I and Fortran), same on z/OS, but not at all in C.

Made following declaration:

char name[50];

and received an error message from compiler:

"CCN3766 The universal character name "]" is not in the allowable range for an identifier. "

Suggested solution inside Messages Manual says:
"Change the universal character name to an allowable one."

But as far as I understand, the declaration needs to use "[" and "]".

Any help/hint will be very much appreciated.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 01, 2012 5:05 am
Reply with quote

There are two fairly common code pages for EBCDIC -- 037 and 1047. 037 uses X'BA' and X'BB' for [ and ] while 1047 uses X'AD' and X'BD'. If you turn on hex in your editor while examining your C program, you will find that your square brackets are one or the other of these; change them to the other pair and recompile your program. They may look funny after conversion, but they are still okay.

If you are using some other code page in EBCDIC, you should be able to find the right pair using Google for that code page.
Back to top
View user's profile Send private message
Ricardo Viegas

New User


Joined: 18 Oct 2012
Posts: 39
Location: Brasil

PostPosted: Thu Nov 01, 2012 5:21 am
Reply with quote

Hi Robert!

Worked fine using code page 1047 for [ and ]. Great!
Thanks!!!!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Nov 01, 2012 5:31 am
Reply with quote

Glad to hear it worked. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Using PARM=('JPn"&SYMBOL&quo... DFSORT/ICETOOL 2
No new posts Cobol-DB2 Programming - Better perfor... DB2 1
Search our Forums:

Back to Top