Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
programming in "C" in z/OS

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

New User


Joined: 18 Oct 2012
Posts: 34
Location: Brasil

PostPosted: Thu Nov 01, 2012 4:52 am    Post subject: programming in "C" in z/OS
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 01, 2012 5:05 am    Post subject:
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: 34
Location: Brasil

PostPosted: Thu Nov 01, 2012 5:21 am    Post subject: Reply to: programming in "C" in z/OS
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Nov 01, 2012 5:31 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us