Could you please help me with the following errors got in the following 2 cases?
Case1: BIND error
While using the following SQL statement in a cursor and trying to BIND the COBOL code
SQL Statement:-
EXEC SQL
DECLARE CURSORNAME CURSOR WITH HOLD FOR
SELECT T1.FIELDNAME1
,T1.FIELDNAME2
FROM TABLE1 T1, TABLE2 T2
WHERE T1.FIELDNAME1=T2.FIELDNAME1
AND T2.FIELDNAME2 = 'A'
FOR UPDATE OF FIELDNAME2
END-EXEC
Error:-
SQLCODE=-203 for FIELDNAME2
RDS CODE=-500
Case2:- Compile error
While using the same SQL statement in a cursor and trying to COMPILE the COBOL code with a qualifier.
SQL Statement:-
EXEC SQL
DECLARE CURSORNAME CURSOR WITH HOLD FOR
SELECT T1.FIELDNAME1
,T1.FIELDNAME2
FROM TABLE1 T1, TABLE2 T2
WHERE T1.FIELDNAME1=T2.FIELDNAME1
AND T2.FIELDNAME2 = 'A'
FOR UPDATE OF T1.FIELDNAME2
END-EXEC
Error:-
'ILLEGAL SYMBOL ".".'
ILLEGAL SYMBOL ".". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: QUERYNO SKIP OPTIMIZE
UPDATE OF T1.