here is my problem.
i need to call a cobol+db2 program from a c program. my problem is not in calling. i am able to perfectly compile and run the program. but the "EXEC SQL" statements in cobol program are completely ingnored. all other statements alone execute. i dont know how to make sql statements execute. please help me.
here is my c code.
void COB1(int *);
my cobol code:
EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL INCLUDE DCL END-EXEC.
EXEC SQL DECLARE CUR CURSOR FOR SELECT * FROM TAB1
01 X PIC S9(9) USAGE BINARY.
PROCEDURE DIVISION USING BY REFERENCE X.
EXEC SQL OPEN CUR END-EXEC.
EXEC SQL FETCH CUR INTO :EMP END-EXEC.
COMPUTE X = X + EMP.
the output from cobol
here tab1 is a table with one column as EMP with one row with value 70. so for the first display statement i should be getting 70 instead of 0 and for the second one 80. please help me.