Fix validate_statement to not rely on hardcoded library#552
Conversation
Signed-off-by: Julia Yan <julia.yan@ibm.com>
|
👋 A new build is available for this PR based on f587afd. |
If we don't qualify it, my understanding would be that it looks it up in the caller's library list or am I wrong about that? |
|
I tested this with a new library where the only thing in my library list was QGPL and QTEMP, so it looks like its grabbing the correct function @forstie might be able to help more on this |
|
Why not make the library a parameter on the SQL function we are creating so when we calculate the hash value, it is not dependent on any hardcoded library name? |
|
No, but I'm not sure that would work (assuming IN_LIBRARY is a parameter): call IN_LIBRARY.CHKSTMNT(...)Worth a try though! |
|
Yea setting it as a param does not work, i get |
Signed-off-by: Julia Yan <julia.yan@ibm.com>
|
Ok @sebjulliand if you could test now with your case. This worked on my local but im not sure if im missing a case |
sebjulliand
left a comment
There was a problem hiding this comment.
Great job @julesyan , it works like a charm now!
Tested with *SYS and *SQL naming. No issues.
I just had to delete the function because of my previous test, but that won't happen to the users.


Changes
Fixes #549, the validate statement component was using a hardcoded library in the source. We have removed the qualifier so it uses the default library of the RUNSQLSTM job (which is already set properly)
How to test this PR
Checklist
console.logs I added