Error when executing RUNSQLSTM from CL program
Not really trying anything fancy.
In CL program
RUNSQLSTM SRCFILE(jwe/QCLSRC) SRCMBR(SQL1) +
COMMIT(*NONE)
In SQL1 I have
SELECT mstid,
SUBSTR(ftxref,1,1) AS ftxref_1,
SUBSTR(HEX(SUBSTR(ftxref,2,7)),1,9) AS char,
ftext,
ftxtno
FROM MEDPDATA/ftxp010
WHERE SUBSTR(ftxref,1,1) NOT IN ('A','M')
AND ftxref NOT IN (SELECT scrcod
FROM tabp160)
UNION
SELECT mstid,
SUBSTR(ftxref,1,1) AS ftxref_1,
SUBSTR(ftxref,2,7) AS char,
ftext,
ftxtno
FROM MEDPDATA/ftxp010
WHERE SUBSTR(ftxref,1,1) IN ('A','M')
AND ftxref NOT IN (SELECT scrcod
FROM tabp160)



