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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
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