Focal Point
Having Trouble with GOTO statements

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1861090522

April 25, 2007, 10:40 AM
saltrogge
Having Trouble with GOTO statements
I'm having trouble getting the following goto statements to work.

-IF '&SEC_LINE' EQ 'SEC010_LN020' THEN GOTO SEC010_LN020
- ELSE IF '&SEC_LINE' EQ 'SEC010_LN040' THEN GOTO SEC010_LN040;
-SEC010_LN020
WHERE ACC_TYPE EQ '1' OR '2';
WHERE TC NE '6018';
WHERE PST_FLG EQ 'Y';
-GOTO ENDWHERE
-SEC010_LN040
WHERE ACC_TYPE EQ '3' OR '4';
WHERE TC NE '6118';
WHERE PST_FLG EQ 'Y';
-GOTO ENDWHERE
-ENDWHERE

The fex seems to execute the first label no matter what. Could you please help me on this? Thanks

Stephen A
April 25, 2007, 10:51 AM
<Tim Howard_ABCBS>
Try taking the ticks of the & Variables:

-IF '&SEC_LINE' EQ 'SEC010_LN020' THEN....
should be
-IF &SEC_LINE EQ 'SEC010_LN020' THEN....
April 25, 2007, 10:53 AM
susannah
or,
just
-GOTO &SEC_LINE ;

We don't know your platform/version (edit your profile signature), so just make sure your statement labels are 12 chars max in length.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
April 25, 2007, 10:55 AM
Lucas
quote:
'&SEC_LINE'


Try removing the ' ' ticks, just a guess.......


7.6.6 Mainframe
7.6.4 Web Focus
Windows

April 25, 2007, 11:19 AM
KevinG
And if removing the ticks doesn't work, split the DM into 2 distinct statements by removing the ELSE and terminating the first line with ;

Kevin


WF 7.6.10 / WIN-AIX
April 25, 2007, 11:32 AM
Darin Lee
Go with Susannah's suggestion


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
April 25, 2007, 11:32 AM
saltrogge
You folks are geniuses. Removing the tick marks solved the problem...

Stephen A