Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
String Comparison
 Login/Join
 
<new2focus>
posted
-DEFAULT &cntry='';
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SAVE AS CARHLD
END
-RUN
-SET &NBR = &LINES;

-REPEAT L_LOOP1 &NBR TIMES
-READ CARHLD NOCLOSE &CTR.10. &CAR.16.

-TYPE CTR=&CTR
-TYPE cntry=&cntry

-IF '&cntry' EQ '&CTR' GOTO STEP02;

-TYPE Inside step01;
-SET &cntry=&CTR
-GOTO STEP03

-STEP02
-TYPE Inside step02;
-GOTO STEP03

-STEP03
-TYPE Inside step03;

-L_LOOP1
END

Why is is not going to step02 eventhough the values for cntry & CTR are showing as the same?
 
Report This Post
Virtuoso
posted Hide Post
Take the Tick Marks off cntry and CTR

-IF '&cntry' EQ '&CTR' GOTO STEP02;

That should help
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
and append a semicolon to
-SET &cntry=&CTR
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
put at the top
-SET &ECHO = ALL ;
and then you can see the whole thing.
might be that your default value is , say,
'FRANCE'
and your value read from the file is
'FRANCE '
so you might want to check length.
-TYPE &cntry.LENGTH
-TYPE &CTR.LENGTH
just a thought.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Silver Member
posted Hide Post
Hi new2focus,

In your code I change one think and it's working.
In if condition i take variables &cntry and &CTR without single quotes and it's working.. your modified code is here...

-DEFAULT &cntry='';
TABLE FILE CAR
PRINT COUNTRY CAR
ON TABLE SAVE AS CARHLD
END
-RUN
-SET &NBR = &LINES;
-REPEAT L_LOOP1 &NBR TIMES
-READ CARHLD NOCLOSE &CTR.10. &CAR.16.


-TYPE CTR=&CTR
-TYPE cntry=&cntry

-IF &cntry EQ &CTR THEN GOTO STEP02;

-TYPE Inside step01;
-SET &cntry=&CTR
-GOTO STEP03

-STEP02
-TYPE Inside step02;
-GOTO STEP03

-STEP03
-TYPE Inside step03;

-L_LOOP1
END
 
Posts: 30 | Location: India | Registered: February 23, 2005Report This Post
<new2focus>
posted
I took out the quotes around &cntry and &CTR and its working. Thanks a lot for all the tips.
You all have a gr8 weekend!
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders