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.
Hello, i have this problem: I have two string: Name a(35) (this string can cointains one or more word. If cointains more word I must to insert '_' between the word ) Surmane A(35) I must write only string.
For exemple: Name = MARIA ROSA Surname = ROSSI NEW_STRING = MARIA_ROSA ROSSI
Thanks for any help!!This message has been edited. Last edited by: Kerry,
Posts: 31 | Location: roma | Registered: August 18, 2005
You haven't filled in your signature with the version that you are running so I don't know if this function is available to you - one reason why you should fill in your signature!
Use STRREP, if it's available to you, on the Name string and then hard concatenate (||) the result to the result of a soft concatenation (|) of a space and the surname-
Use search (top right) to locate previous posts on STRREP or use the help files in Dev Studio.
Click "Search the Technical Documentation Library" link in the top right hand area of this page and then in the right hand pair of form inputs choose "FOCUS/WebFOCUS Messages" and then type STRREP in the lower text box. Click GO to get a result set from your search. I'd suggest the fourth item in the list as being the best for your understanding.
Good luck
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
APP PATH ibisamp
DEFINE FILE EMPLOYEE
LENGTH/I2=ARGLEN(25,JOB_DESC,LENGTH);
NEWJD/A25=STRREP(25,JOB_DESC,1,' ',1,'_',25,NEWJD);
JOB_DESC_OUT/A25=SUBSTR(25,NEWJD,1, LENGTH, LENGTH, JOB_DESC_OUT);
END
TABLE FILE EMPLOYEE
BY JOB_DESC BY LENGTH BY NEWJD BY JOB_DESC_OUT
END
Roma, i've had ageda with using just the STRREP function , as it will replace all the trailing blanks as well, so my workaround is to 1) find the actual length of the name using the ARGLEN function 2) do the replace 3) then trim the result back to the beginning length, using the SUBSTRing function.
Now you're ready to concat the LAST_NAME; Proceed as T has demonstrated for you.
As T suggests, the manual 'USING FUNCTIONS' is one of the 4 core manuals, and its priceless in value. Focus has text editing functions that are sine qua non. -S.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
You might also look into using the GETTOK option. Note when building strings with concatenation, the length of the target string must be defined of a length at least as long as the sum of the two originating strings.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004