Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Using RUNSQLSTM to create a UDF works great.
However, I wanted to port it to one of the V5R4M0 systems we have.
So I issued: RUNSQLSTM CVTDATE TGTRLS(V5R4M0)
It failed with classic amateur CL programming errors. Meaning who ever wrote the command was a bone head.
If I specify TGTRLS(V7R1M0) or TGTRLS(*CURRENT) it works, but anything else, fails.
There is a PTF to fix this issue, but we have that installed and still get that failure.
Lucky enough to have same versions on all boxes out here so I cannot test it for you. Looks like you'll have to check with the bone-head. :o)
Seem to have solved the issue.
If I add the following to the SQL source:
SET OPTION TGTRLS = V5R4M0
it compiles correctly.