Focal Point
Weird error on UNIX

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

March 02, 2005, 08:17 PM
<Pietro De Santis>
Weird error on UNIX
This fex:

-SET &ECHO=ALL;

-SET &A_ENV = IF 'aaadevzzz' CONTAINS 'dev' THEN 'D'
- ELSE IF 'aaadevzzz' CONTAINS 'test' THEN 'T'
- ELSE IF 'aaadevzzz' CONTAINS 'uat' THEN 'Q' ELSE 'P';

-SET &A_INT_DB_NAME = 'INT' || &A_ENV;

-TYPE &A_INT_DB_NAME

gives me an error when run on a UNIX server:

0 ERROR AT OR NEAR LINE 25 IN PROCEDURE _ADHOCRQFOCEXEC *
(FOC305) SPECIFIED LABEL NOT FOUND: P

When I run the same code on a Windows server, there is no error.
March 02, 2005, 08:23 PM
<Pietro De Santis>
If I put the IF statement on one line, it works.

-SET &A_ENV = IF 'aaadevzzz' CONTAINS 'dev' THEN 'D' ELSE IF 'aaadevzzz' CONTAINS 'test' THEN 'T' ELSE IF 'aaadevzzz' CONTAINS 'uat' THEN 'Q' ELSE 'P';
March 02, 2005, 08:28 PM
suzy_smith
Welcome to the unix version of WebFOCUS, where all bets are off.

It's even weirder that that. If you save and close the fex so that it's no longer an "ad hoc" fex, it will probably run OK.

We have a case in on it.
March 03, 2005, 01:36 AM
<Kalyan>
Correct me if I am wrong but I use a semi colon to end continuation lines like this

-IF TESTVAL EQ 'A' THEN GOTO 1;
-ELSE IF TESTVAL EQ 'B' THEN GOTO 2;

Thanks,
Kalyan
March 03, 2005, 10:18 AM
Piipster
The semi-colon is used to end the entire statement, not each line.
March 03, 2005, 06:47 PM
Tom Walker
This runs on our AIX 5.1 correctly with WF 5.3.2, yet fails with WF 4.3.6. I recall that the last version of character based focus that we used (ver 6.9) also failed with the same problem.
March 03, 2005, 06:51 PM
<Pietro De Santis>
Oddly enough, when I had only the lines of code I originally posted, the fex failed. When I embedded the lines of code in an MRE fex, it worked.
March 03, 2005, 11:07 PM
suzy_smith
Pietro

What happens if you -INCLUDE the original continued lines in a non-MRE focexec?

We don't have MRE here, are using servlet on a unix platform, but are developing with devstudio on Winders.

Suzy