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 using the following if else statement -SET &w = IF &Text.&I.A150 CONTAINS "some text" THEN PRINT "hello" ELSE PRINT "helloq1";
i dont understand what is the error its giving IF ..THEN..ELSE synatx error please helpThis message has been edited. Last edited by: <Kathryn Henning>,
I don't think you can declare the size of an amper variable. Furthermore, you are using an indexed variable. Does &I have a value?
Please declare &I=1; and remove A150. Then try it and see what happens. Also put -SET &ECHO=ALL at the very top of your code to observe this result in detail.
PRINT in that context is new to me. Is that correct syntax?
For giggles remove the two PRINTs. That's what I would have done. Should set &w to the correct value.
What does it look like in the code with the amper-variables resolved by the way? -SET ECHO=ALL at the top and show us what the command going to the parser looks like.This message has been edited. Last edited by: John_Edwards,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
Instead of the print command where you've coded put GOTO PrintIt. The code a -PrintIt label, where you'd code the print XXX command, followed by -EXIT to leave the program.
Below the -PrintIt section you have only 2 options for output.... 1. Issue a table request to print a report, or 2. Issue a -TYPE &variable . Or, -TYPE Hello
-SET &MAS_COUNT = &LINES; -REPEAT :MAS_READ FOR &I FROM 1 TO &MAS_COUNT; -READ mymaster &Text.&I.A80 -SET &w = IF &Text.&I CONTAINS "sometext" THEN GOTO Printit ELSE GOTO REPEAT; -*IF &IORETURN NE 0 THEN GOTO END_READ; -TYPE text =&Text.&I.A80 -:MAS_READ
-Printit -TYPE hello -EXIT
My question is is the IF statement correst?? can i issue GOTO REPEAT in the ELSE ??
As my Error is
0 ERROR AT OR NEAR LINE 29 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR
My line 29 is -SET &w = IF &Text.&I CONTAINS "sometext" THEN GOTO Printit ELSE GOTO REPEAT;