Issue in variable declaration



IBM's flagship relational database management system

Issue in variable declaration

Postby Dora ji » Mon Jul 08, 2013 2:43 pm

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??
Dora ji
 
Posts: 12
Joined: Sun Jul 07, 2013 11:12 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Issue in variable declaration

 

Re: Issue in variable declaration

Postby Akatsukami » Mon Jul 08, 2013 3:12 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Issue in variable declaration

Postby Robert Sample » Mon Jul 08, 2013 4:43 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post