Code:
Message . . . . : Indicator variable required. Cause . . . . . : A FETCH, an embedded SELECT, a CALL or a SET or VALUES INTO statement has resulted in a null value, but an indicator variable was not specified for host variable ONHOLD. The relative position of the host variable in the INTO clause or parameter list is 7. If the host variable name is *N, an SQLDA was specified. Recovery . . . : Specify an indicator variable, and precompile the program again.
This was throwing the error
Code:
c clear OnHold c/exec sql c+ select sum(IOLCNQ) c+ into :OnHold c+ from inofhld c+ where iocomp = : imcomp and c+ iobranch = : imbranch and c+ iomat = : immat and c+ ioanal = : imanal and c+ iosize = : imsize and c+ iolin = : imlin c/end-exec
I did this to get rid of error message
Code:
c clear OnHold c/exec sql c+ select COALESCE(sum(IOLCNQ),0) c+ into :OnHold c+ from inofhld c+ where iocomp = : imcomp and c+ iobranch = : imbranch and c+ iomat = : immat and c+ ioanal = : imanal and c+ iosize = : imsize and c+ iolin = : imlin c/end-exec
can anyone explain why?
Thanks
Jamie
Comment