By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,017 Members | 951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,017 IT Pros & Developers. It's quick & easy.

How can I precomfile .sqc including header file

P: 3
* environment : Linux UDB V8.2
1. a.h
#define csize 13
struct { short len; char data[csize]; } firstnmest;

2. a.sqc
#include <stdio.h>
EXEC SQL INCLUDE SQLCA;
int main()
{
EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL INCLUDE 'a.h';
EXEC SQL END DECLARE SECTION;
}

3. db2 prep a.sqc bindfile
LINE MESSAGES FOR a.sqc
------ --------------------------------------------------------------------
SQL0060W The "C" precompiler is in progress.
6 SQL0062W Starting INCLUDE of file
"/db2home/db2inst1/work/tmp2/a.h".
2 SQL0008N The token "csize" found in a host variable
declaration is not valid.
2 SQL0008N The token "}" found in a host variable
declaration is not valid.
6 SQL0063W Completed INCLUDE of file "a.h".
SQL0095N No bind file was created because of previous
errors.
SQL0091W Precompilation or binding was ended with "3"
errors and "0" warnings.
Mar 21 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.