If I write an SQL procedure in SQL PL, I can signal custom SQL errors using
declare exit handler for SQLState '77001' resignal;
and
signal sqlstate '77001' set message_text = errorMessage;
But If I wanted to write an RPGLE program, and wrap that with an external SQL procedure, how would I signal custom SQL errors? I tried doing a signal sql state from an exec sql and it didn't do anything.
declare exit handler for SQLState '77001' resignal;
and
signal sqlstate '77001' set message_text = errorMessage;
But If I wanted to write an RPGLE program, and wrap that with an external SQL procedure, how would I signal custom SQL errors? I tried doing a signal sql state from an exec sql and it didn't do anything.
Comment