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 was wondering if anyone has other methods of keeping certain characters in a alphanumeric field and dumping all other characters. I came up with a function, which is used when a TABLE FILE is issued. I also don't know what all the special characters could be. The performance is decent since I'm applying it only to a limited number of records but still looking for alternatives.
DEFINE FUNCTION F_REMOVE_SPECIALCHAR (IN_STRING/A300)
TMP_STRING/A300=IN_STRING;
-SET &SMSF_FRSC_I = 0;
-REPEAT CHK_ALL_CHAR 240 TIMES
-SET &SMSF_FRSC_I = &SMSF_FRSC_I + 1;
-* Ascii codes of all the characters to keep:
-* space(32), #(35), -(45), 0-9, a-z, A-Z
-IF ( (&SMSF_FRSC_I EQ 32) OR (&SMSF_FRSC_I EQ 35) OR (&SMSF_FRSC_I EQ 45) OR ((&SMSF_FRSC_I GE 48) AND (&SMSF_FRSC_I LE 57)) OR ((&SMSF_FRSC_I GE 65) AND (&SMSF_FRSC_I LE 90)) OR ((&SMSF_FRSC_I GE 97) AND (&SMSF_FRSC_I LE 122)) ) THEN GOTO SMSF_FRSC_END_CHK_ALL_CHAR;
-* Convert unwanted characters to space
TMP_STRING/A300 = CTRAN(300, TMP_STRING, &SMSF_FRSC_I, 32, 'A300');
-SMSF_FRSC_END_CHK_ALL_CHAR
-* Removing extra spaces
STRING_RM_SPACE/A300=SQUEEZ(300,TMP_STRING,'A300');
F_REMOVE_SPECIALCHAR/A310 = STRING_RM_SPACE;
END
-RUN
Looking forward to suggestions ... thanks! JLThis message has been edited. Last edited by: JL,
Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.
Starting with WebFOCUS 7.1.0, string replacements (more than 1 character) can be done using the STRREP function. The following illustrates an example on how to convert CRLF characters to spaces: