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 need to capture the right 2 char of the value in a field. The length of the values in the field is not consistent. There are 136 pages on the forum with the word right and a succesful search is not possible.
For example,
abcde - 02 abc - 03 abcdefghij = 04 abcdefgh - 05
I want the right 2 char which happen to be numbers in the case. What would be used to capture these values?
Thank youThis message has been edited. Last edited by: Geri,
Hi Geri, You could try something like the following:-
This example uses a single blank space as a delimiter to break an address line into tokens and returns the last token, which is the zip code:
TABLE FILE EMPLOYEE PRINT ADDRESS_LN3 AND COMPUTE LAST_TOKEN/A10 = GETTOK(ADDRESS_LN3, 20, -1, ' ', 10, LAST_TOKEN) ; AS 'LAST TOKEN,(ZIP CODE)' WHERE TYPE EQ 'HSM' END
The example produces the following report:
PAGE 1 LAST TOKEN ADDRESS_LN3 (ZIP CODE) ----------- ---------- RUTHERFORD NJ 07073 07073 NEW YORK NY 10039 10039 FREEPORT NY 11520 11520 NEW YORK NY 10001 10001 FREEPORT NY 11520 11520 ROSELAND NJ 07068 07068 JERSEY CITY NJ 07300 07300 FLUSHING NY 11354 11354
_______________________ *** WebFOCUS 8.1.05M ***
Posts: 196 | Location: London, UK | Registered: December 06, 2005
>>>>>>>>>>> Here's an example using the CAR file and the CAR field(A16).
-* DEFINE FILE CAR RJUST_CAR/A16 = RJUST(16, CAR, RJUST_CAR); LAST2_CAR/A2 = EDIT(RJUST_CAR,'$$$$$$$$$$$$$$99'); END -* TABLE FILE CAR PRINT CAR RJUST_CAR LAST2_CAR BY COUNTRY END