View previous topic :: View next topic
|
Author |
Message |
Ricardo Viegas
New User
Joined: 18 Oct 2012 Posts: 39 Location: Brasil
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Ricardo Viegas
New User
Joined: 18 Oct 2012 Posts: 39 Location: Brasil
|
|
|
|
Hi Robert!
Worked fine using code page 1047 for [ and ]. Great!
Thanks!!!! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear it worked. |
|
Back to top |
|
|
|