Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Syntax error? [RESOLVED]
Go
New
Search
Notify
Tools
Reply
  
Syntax error? [RESOLVED]
 Login/Join
 
Platinum Member
posted
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
 
Posts: 106 | Registered: June 25, 2009Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 189 | Registered: October 19, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
(FOC1517) UNRECOGNIZED COMMAND IF 2627 NE 0 THEN GOTO EXIT ELSE GOTOCONTINUE;


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Reply With QuoteReport This Post
Platinum Member
posted Hide Post
-IF &RETCODE NE 0 THEN GOTO EXIT ELSE GOTO CONTINUE;

Must have the -


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 189 | Registered: October 19, 2010Reply With QuoteReport This Post
Gold member
posted Hide Post
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
 
Posts: 90 | Location: Stuttgart | Registered: October 20, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks for the input. Works fine now.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Reply With QuoteReport This Post
Member
posted Hide Post
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;
 
Posts: 29 | Registered: November 21, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks Rob. Hopefully MichaelBalle only used it as an example and had his own label names.


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 189 | Registered: October 19, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Syntax error? [RESOLVED]

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.