Page 1 of 1

Issue in variable declaration

PostPosted: Mon Jul 08, 2013 2:43 pm
by Dora ji
Hi all,

I am a fresher to the mainframe.Kindly i am in need of your help.
I am trying to include DB2 commands in C program.In variable declaration i face a issue.Zos is not accepting open/close square brackets([]).But in Char datatype to define a number of characters i am in need of it.How can i declare the char datatype??

Re: Issue in variable declaration

PostPosted: Mon Jul 08, 2013 3:12 pm
by Akatsukami
Please show us the code fragment giving the error and the error itself (message number and text). C/370 does use square brackets, so you may not have diagnosed the problem correctly.

Re: Issue in variable declaration

PostPosted: Mon Jul 08, 2013 4:43 pm
by Robert Sample
EBCDIC uses multiple code pages. In standard EBCDIC, X'BA' and X'BB' are the square brackets. However, the IBM C compilers use X'AD' and X'BD' for the square brackets. Turn hex on in your editor and determine which you have; you'll probably need to change them all to the other set to get your program to compile.