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 have been working on a technique to extract the last name from file containing names in the format Smith J Albert PhD. I want to extract Smith and add a comma to it (Smith,) and concatenate the remaining elements to look like: Smith, J Albert PhD.
As an example in Japan for the model 'COROLLA 4 DOOR DIX AUTO'. I can successfully extract COROLLA, but I want to extract the entire string after COROLLA, to include '4 DOOR DIX AUTO'.
Here is the code as I have written it thus far:
-*SET &ECHO=ALL; -* -* TABLE FILE CAR PRINT CAR MODEL COMPUTE MLEN/I2 = ARGLEN(24, MODEL, MLEN); COMPUTE QBLNK/I2 = POSIT(MODEL, MLEN, ' ', 1, 'I2'); COMPUTE LNME/A11 = SUBSTR(15,MODEL,1,QBLNK-1,QBLNK,'A11'); COMPUTE FNME/A70 = SUBSTR(15,MODEL,QBLNK+1,QBLNK+(MLEN-QBLNK),(MLEN-QBLNK)+1,'A70'); BY COUNTRY END -RUN
-EXIT
Any ideas?
Thanks!This message has been edited. Last edited by: Kerry,
Does something like this get you what you need? I'm finding the position of the first blank, breaking it out into two strings, before and after that position, then concatenating with a comma-blank in between.
TABLE FILE CAR
PRINT CAR MODEL
COMPUTE POSIT/I2=POSIT(MODEL, 20,' ', 1, POSIT);
COMPUTE LAST_NAME/A20V=SUBSTR(20, MODEL, 1, POSIT-1, POSIT-1, LAST_NAME);
COMPUTE FIRST_NAME/A20V=SUBSTR(20,MODEL,POSIT+1,20,20-POSIT,FIRST_NAME);
COMPUTE NAME/A21=LAST_NAME||', '|FIRST_NAME;
END
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007