TomLiotta
8025 pts. | Sep 25 2009 1:33AM GMT
Hard to answer for multiple reasons. Please describe the COBOL — ILE or OPM? Is it a module in a larger program? What options were specified on the CRTxxx command(s)? What was the SET OPTION statement in the compile module/program? What PROCESS statement was used?
Also:
- UPDATE FILEA A SET A.ITMID = COALESCE((SELECT DISTINCT B.ITMID FROM FILEB B WHERE A.FLDA = B.FLDA AND A.FLDB = B.FLDB AND A.FLDC = B.FLDC),:NO-ITM)
Since that statement contains a host variable — NO-ITM — it wouldn’t run in QMQRY nor in interactive SQL. You had to use a different UPDATE statement. What was it? And what is the COBOL definition of NO-ITM? (NO-ITM probably doesn’t matter, but it might help in understanding.)
Did the COBOL execution actually update rows causing A.ITMID to become null when it previously had a value or was A.ITMID already null?






