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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
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
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.
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
JOB_DESC_OUT/A25=SUBSTR(25,NEWJD,1, LENGTH, LENGTH, JOB_DESC_OUT);
TABLE FILE EMPLOYEE
BY JOB_DESC BY LENGTH BY NEWJD BY JOB_DESC_OUT
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.
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004