Hi,
SQL;
Compiler errors;
There are no other errors in the compiler (above 0) just these 3.
If I run the SQL in STRSQL, it works fine.
FILE1 and FILE2 aren't defined in the F specs of my program as I thought they didn't need to be for SQL? Also, it wouldn't explain why FILE1 doesn't have any issues.
Compiling with RPGPPOPT *LVL2 doesn't help either
So I'm confused here as to what to try next? I've probably made a stupid mistake, which is why I tried the SQL manually initially.
Any ideas?
Cheers,
Ryan
SQL;
Code:
Exec SQL DECLARE CC01 CURSOR FOR SELECT F1PONO FROM FILE1 INNER JOIN FILE2 ON F1COMP = F2COMP AND F1DEPT = F2DEPT AND F1PONO = F2PONO WHERE F1COMP = :COMP AND F1DEPT = :DEPT AND F1STAT NOT IN('C', 'X') AND F2STYL = :STYL GROUP BY F1PONO;
Code:
*RNF7030 30 2879 065900 The name or indicator F2COMP is not defined. *RNF7030 30 2881 066100 The name or indicator F2DEPT is not defined. *RNF7030 30 2880 066000 The name or indicator F2PONO is not defined.
If I run the SQL in STRSQL, it works fine.
FILE1 and FILE2 aren't defined in the F specs of my program as I thought they didn't need to be for SQL? Also, it wouldn't explain why FILE1 doesn't have any issues.
Compiling with RPGPPOPT *LVL2 doesn't help either
So I'm confused here as to what to try next? I've probably made a stupid mistake, which is why I tried the SQL manually initially.
Any ideas?
Cheers,
Ryan
Comment