Focal Point
[CLOSED] Aper Variable as LABEL

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

April 20, 2011, 04:01 PM
Neenz
[CLOSED] Aper Variable as LABEL
I am trying to go to a lable which is an amper value and I get back the error that label cant be found.

Eg:
-SET &TEST = '-TEST' ;
-IF 1 EQ 1 GOTO &TEST ELSE GOTO NO_TEST;

&TEST
-NO_TEST

This message has been edited. Last edited by: Kerry,


WF: 7.6.8
OS/Platform: Windows, Unix
April 20, 2011, 04:36 PM
Francis Mariani
This doesn't work very well. it's the nature of Dialogue Manager - each line is evaluated immediately. The moment
-IF 1 EQ 1 GOTO &TEST ELSE GOTO NO_TEST;
is evaluated, the
&TEST
label is not evaluated.

Here is an example of what I had to do:

-GOTO &FML_INCL1

-IIRBAL1
-INCLUDE shared11/app/iirbal_recap.fex
-GOTO IIRFML1_END

-IIRREV1
-INCLUDE shared11/app/iirrev_recap.fex
-GOTO IIRFML1_END

-IIREXP1
-INCLUDE shared11/app/iirexp_recap.fex
-GOTO IIRFML1_END

-IIRFTE1
-INCLUDE shared11/app/iirfte_recap.fex
-GOTO IIRFML1_END

-IIRFML1_END



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 20, 2011, 06:52 PM
Waz
Interestingly enough, you can use Amper vars as dialog manager IF or GOTO or comments.

I use this for error handling from -INCLUDEs
e.g.
-SET &ECHO=ALL ;
-SET &TestVal1 ='GOTO';
-SET &TestVal2 ='*';
-SET &TestDest='Error';


-&TestVal1.EVAL &TestDest

-TYPE No Error

-&TestVal2.EVAL &TestDest

-TYPE End

-EXIT
-Error

-TYPE Error Found



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!