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 getting the value for region in an amper variable and truncating it to remove trailing spaces.
-READ HOLD, ®ION
-SET ®ION2 = TRUNCATE(®ION);
-TYPE (®ION2.LENGTH)
-*SET ®ION2 = 'US'; -IF ®ION EQ US THEN GOTO :US ELSE IF ®ION EQ Europe THEN GOTO :EMEA ELSE IF ®ION EQ LACC THEN GOTO :LACC ELSE GOTO :JAPA;
However, it seems to have some hidden characters which is why the simplest of If condition is failing.
Length of region post truncate is always 2 more than what it should be.This message has been edited. Last edited by: <Emily McAllister>,
There is no reason that the length impact the test. If your test fail, it's due to something else.
TABLE FILE CAR
BY COUNTRY AS 'CNTRY'
WHERE COUNTRY EQ 'FRANCE';
-*WHERE COUNTRY EQ 'W GERMANY';
-*WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD AS HLD FORMAT BINARY
END
-RUN
-READFILE HLD
-IF &CNTRY EQ 'W GERMANY' THEN GOTO :US ELSE IF &CNTRY EQ FRANCE THEN GOTO :EMEA ELSE IF &CNTRY EQ ENGLAND THEN GOTO :LACC ELSE GOTO :JAPA;
-:US
-TYPE TEST RESULT = US, CNTRY: &CNTRY, CNTRY LENGTH: &CNTRY.LENGTH
-GOTO XEND;
-:EMEA
-TYPE TEST RESULT = EUROPE, CNTRY: &CNTRY, CNTRY LENGTH: &CNTRY.LENGTH
-GOTO XEND;
-:LACC
-TYPE TEST RESULT = LACC, CNTRY: &CNTRY, CNTRY LENGTH: &CNTRY.LENGTH
-GOTO XEND;
-:JAPA
-TYPE TEST RESULT = JAPAN, CNTRY: &CNTRY, CNTRY LENGTH: &CNTRY.LENGTH
-XEND
This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Instead of READ, have you tried READFILE.. Much easier to use
... as long as the column and amper var names match.
I was going to suggest that, and also ask to post the HOLD MASTER file. If the HOLD data are not comma-delimited, then perhaps the comma in the -READ will result in the trailing CR LF becoming part of the value of ®ION
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005