February 08, 2007, 01:49 PM
Jason K.syntax error?
Hello!
When I run the following code I get an error of (FOC002) A WORD IS NOT RECOGNIZED: GOTO
-IF &REP_GRP_ATTRIBUTE EQ 'FOC_NONE' THEN GOTO MYFASTER ELSE GOTO MYSLOWER;
-MYFASTER
TABLE FILE MATRIX_DIV_MTD
GOTO ADD_DETAILS;
-MYSLOWER
TABLE FILE MATRIX_DIV_MONTHLY
GOTO ADD_DETAILS;
I've looked up the syntax for GOTO and it lists the ; as optional...and I've tried it both ways with no luck.
Thanks!
February 08, 2007, 01:55 PM
Tony AJason,
Grab the manual and read up on dialogue manager. GOTO is a DM command and not a WF command so it should be contained on a line prefixed with a hypen -
-GOTO .......; or
-IF .... THEN GOTO ....;
T
February 08, 2007, 02:19 PM
LushengIf you treat GOTO as a standalone statement in dialog manager, you have to have a prefix -. If it is used within if .... then goto ... else goto, you don't need the prefix.
February 13, 2007, 09:51 AM
KerryHi Jason,
Can you please correct both line?
from:
GOTO ADD_DETAILS;
to:
-GOTO ADD_DETAILS;
Hope this helps.
Cheers,
Kerry
February 27, 2007, 03:40 PM
Jason K.it all works now!
Thank you for your patience!
March 10, 2007, 02:06 PM
Danny-SRLJason,
A small comment. You should code:
-GOTO ADD-DETAILS
without the semicolon. That is what the book says. Although you will find that it works with the semicolon, some day, a future release might be more orthodox and you will have problems.