Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to verify SQLDA value?

Status
Not open for further replies.

nxm150

Programmer
May 22, 2002
78
US
I am coding dynamic SQL. I have a input file with 100 claims. On 4 of the claims my program gets a +100 on the FETCH, but when I hard code a SELECT right after my FETCH, I am getting a row back. I am guessing my pointer is getting hosed somehow. Dynamic SQL uses address's for its WHERE clause. I have 2 variables in my WHERE clause. I am setting the address in INA-SQLDA as follow, right before I OPEN the cursor.

SET INA-SQLDATA(1) TO ADDRESS OF VARIABLE-A
SET INA-SQLDATA(2) TO ADDRESS OF VARIABLE-B

MOVE IN-FIELD1 TO VARIABLE-A.
MOVE IN-FIELD2 TO VAIRABLE-B.

When I display INA-SQLDA, how do I verify fields INA-SQLDATA(1) and INA-SQLDATA(2)?
 
Is the program containing the dynam SQL the only program running or is it being called by another program? I'm ussuming you are coding COBOL looking at your code. If it is a called program, do you use any variables defined in Linkage Section in your SQL?
 
Yes, my program is the only one running. I figured out my problem. I have 2 strings for my WHERE clause. The 1st WHERE clause had 2 columns, the 2nd WHERE clause had 3 columns. Without thinking, I set up my parm so that it would string the 2nd WHERE clause. That is why I got a +100.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top