What is wrong with thnis Syntax? I am getting a syntax error on the IF...THRN....ELSE statement.
SQL SQLMSS INSERT INTO XXX (YYY ,ZZZZ) END -RUN
-IF &RETCODE NE 0 THEN -EXIT ELSE END
All I want to do is exit the report if the write wasn't successful. If it was, then go on processing the report.This message has been edited. Last edited by: Ted Michalski,
7.7.02 Windows EXCEL, PDF, CSV, TEXT
October 27, 2010, 01:34 PM
dbeagan
More like this:
SQL SQLMSS
INSERT INTO XXX
(YYY
,ZZZZ)
;
END
-RUN
-IF &RETCODE NE 0 THEN GOTO EXIT ELSE GOTO CONTINUE;
-CONTINUE
{yada yada}
-EXIT
WebFOCUS 8.2.06
October 27, 2010, 01:57 PM
Ted Michalski
(FOC1517) UNRECOGNIZED COMMAND IF 2627 NE 0 THEN GOTO EXIT ELSE GOTOCONTINUE;
7.7.02 Windows EXCEL, PDF, CSV, TEXT
October 27, 2010, 02:03 PM
dbeagan
-IF &RETCODE NE 0 THEN GOTO EXIT ELSE GOTO CONTINUE;
Must have the -
WebFOCUS 8.2.06
October 28, 2010, 02:05 AM
MichaelBalle
You have to do something like this:
-IF &RETCODE NE 0 THEN GOTO EXIT_LBL ELSE GOTO END_LBL; -* -EXIT_LBL EXIT -* -END_LBL END
WebFOCUS 7.6, 7.7 Windows, All Output formats
October 28, 2010, 07:22 AM
Ted Michalski
Thanks for the input. Works fine now.
7.7.02 Windows EXCEL, PDF, CSV, TEXT
October 28, 2010, 09:54 AM
Rob Bowen
dbeagan,
CONTINUE is a researved word and does not play nicely with goto.
At least under 7.6.11, "-GOTO CONTINUE" will work but using with a "-IF" will not.
WebFOCUS 8.1.04; SQL Server 2012; Windows 7; Windows Server 2012 R2;
October 28, 2010, 10:20 AM
dbeagan
Thanks Rob. Hopefully MichaelBalle only used it as an example and had his own label names.