Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 33
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: 7932
Location: Bellevue, IA

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: 33
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: 7932
Location: Bellevue, IA

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
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm
No new posts Event-driven programming (BTS) VS (ST... Rohit Umarjikar CICS 2 Sat Jun 11, 2016 2:05 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us