As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.
What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.
During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.
I am trying to use the code below in a DEFINE and I am getting this error, "(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: BEGIN (FOC844) UNCORRECTABLE SYNTAX ERROR: IF"
I'm trying to use the same syntax shown in the "Nesting IF Commands" section of the WebFOCUS Language Reference. Can anybody tell me how to structure this so it will work in a DEFINE?
THANKS!
YR_PRIOR_96/D12=
IF (ENG_SOP LT 1960) THEN BEGIN
IF ((&POP_YR - ENG_LIF_YRS) GT 1960) THEN BEGIN
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) LT 1) THEN 1 ;
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) GE 1) THEN (1996 - (&POP_YR - ENG_LIF_YRS));
ENDBEGIN
ELSE IF ((&POP_YR - ENG_LIF_YRS) LE 1960) THEN (1996 - 1960)
ENDBEGIN
IF (ENG_SOP GE 1960) THEN BEGIN
IF ((&POP_YR - ENG_LIF_YRS) GT ENG_SOP) THEN BEGIN
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) LT 1) THEN 1;
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) GE 1) THEN (1996 - (&POP_YR - ENG_LIF_YRS));
ENDBEGIN
ELSE IF ((&POP_YR - ENG_LIF_YRS) LE ENG_SOP) THEN BEGIN
IF ((1996 - ENG_SOP) LT 1.0) THEN 1;
IF ((1996 - ENG_SOP) GE 1.0) THEN (1996 - ENG_SOP);
ENDBEGIN
ENDBEGIN
ELSE 1;
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
The code BEGIN and ENDBEGIN are IMHO typical Visualbasic codes. Change it to ( and ) also the ";" are not correct codes, change them to "ELSE" I think that would work.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Thanks for the replacement suggestions. That did the trick! I ended up with...
YR_PRIOR_96/D12=
IF (ENG_SOP LT 1960) THEN (
IF ((&POP_YR - ENG_LIF_YRS) GT 1960) THEN (
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) LT 1) THEN 1
ELSE IF ((1996 - (&POP_YR - ENG_LIF_YRS)) GE 1) THEN (1996 - (&POP_YR - ENG_LIF_YRS))
)
ELSE IF ((&POP_YR - ENG_LIF_YRS) LE 1960) THEN (1996 - 1960)
)
ELSE IF (ENG_SOP GE 1960) THEN (
IF ((&POP_YR - ENG_LIF_YRS) GT ENG_SOP) THEN (
IF ((1996 - (&POP_YR - ENG_LIF_YRS)) LT 1) THEN 1
ELSE IF ((1996 - (&POP_YR - ENG_LIF_YRS)) GE 1) THEN (1996 - (&POP_YR - ENG_LIF_YRS))
)
ELSE IF ((&POP_YR - ENG_LIF_YRS) LE ENG_SOP) THEN (
IF ((1996 - ENG_SOP) LT 1.0) THEN 1
ELSE IF ((1996 - ENG_SOP) GE 1.0) THEN (1996 - ENG_SOP)
)
)
ELSE 1;
Regards,
Dan
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007