Home » Other » Client Tools » converting from Informix 4GL to PL/SQL
converting from Informix 4GL to PL/SQL [message #37319] Wed, 30 January 2002 15:32 Go to next message
Dilip
Messages: 12
Registered: January 2002
Junior Member
Could somebody help me in following problem

I am converting 4GL to PL/SQL. 4GL uses "whenever Error continue" statement. how do I translate it into PL/SQL.

Can I use if condition like this to meet same effect:
IF SQLCODE <>0
THEN GOTO next_statement1;
END IF;

Thanks
Re: converting from Informix 4GL to PL/SQL [message #37321 is a reply to message #37319] Wed, 30 January 2002 17:39 Go to previous messageGo to next message
sokeh
Messages: 77
Registered: August 2000
Member
The whener error has two very important formats:
continue and goto.
CONTINUE
Indicates to continue with the next instruction in the application(block).

GO TO label
Indicates to go to the statement immediately following the label specified after GO TO. (GO TO can be two words, or one word, GOTO.)
If the WHENEVER statement is not used, the default action is to continue processing if an error, warning, or exception condition occurs during execution.

Hope this helps!
Re: converting from Informix 4GL to PL/SQL [message #38656 is a reply to message #37319] Sat, 04 May 2002 03:03 Go to previous message
Ahmed Koya
Messages: 1
Registered: May 2002
Junior Member
Why don't you use the following in your scripts:_
whenever sqlerror exit 1
whenever oserror exit 2

This will trap both sql and os errors
Previous Topic: Synonym for TYPE(URGENT)
Next Topic: trigger, update mire
Goto Forum:
  


Current Time: Thu Mar 28 10:35:30 CDT 2024