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’m using CTRAN in dialogue manager to replace single quotes with a space. The parameter string is from a multi selection of countries in the car file. I’m trying to replace the single quotes with a space and the OR between the countries with a comma. The &PARM1 variable is stopping at 16 characters. I’m not sure why.
The final output should look like: England , France , Italy , Japan , W Germany
-DEFAULTH &P1 = ''; -DEFAULTH &P2 = ''; -DEFAULTH &P3 = ''; -DEFAULTH &P4 = ''; -DEFAULTH &P5 = ''; -* replace single quote with space (ascii dec) 39 = single quote 32 = space -SET &PARM1 = CTRAN(100, &COUNTRY, 39, 32, 100); -TYPE &|PARM1 == &PARM1 -* FILEDEF TEMPFILE DISK TEMPFILE.TXT
DEFINE FILE CAR COUNTRY1/A50 = COUNTRY; END TABLE FILE CAR SUM CAR.BODY.SALES BY CAR.ORIGIN.COUNTRY WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR)).COUNTRY:.; ENDThis message has been edited. Last edited by: Spence,
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
&PARM1 == ENGLAND OR FRANCE OR ITALY OR JAPAN OR W GERMANY
FILEDEF TEMPFILE DISK TEMPFILE.TXT
&P1 == ENGLAND OR FRANCE OR ITALY OR JAPAN OR W GERMANY
&P2 ==
&P3 ==
&P4 ==
&P5 ==
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
&P1 == ENGLAND OR FRANCE OR ITALY OR JAPAN OR W GERMANY
Now the question is can CTRAN or another function convert the OR to a comma? It appears that CTRAN can only convert a single character and not the string of ' OR '.
DEFINE FILE CAR COUNTRY1/A50 = COUNTRY; END TABLE FILE CAR SUM CAR.BODY.SALES BY CAR.ORIGIN.COUNTRY WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR)).COUNTRY:.; END
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
-DEFAULTH &P1 = '';
-DEFAULTH &P2 = '';
-DEFAULTH &P3 = '';
-DEFAULTH &P4 = '';
-DEFAULTH &P5 = '';
-* replace single quote with space (ascii dec) 39 = single quote 32 = space
-SET &PARM1 = CTRAN(100, &COUNTRY, 39, 32, A100);
-TYPE &|PARM1 == &PARM1
-SET &PARM1 = STRREP(100, &PARM1, 6, ' OR ', 1, ',', 100, &PARM1);
-TYPE &|PARM1 == &PARM1
-*
FILEDEF TEMPFILE DISK TEMPFILE.TXT
-RUN
-WRITE TEMPFILE &PARM1
-RUN
-READ TEMPFILE,&P1,&P2,&P3,&P4,&P5
-TYPE &|P1 == &P1
-TYPE &|P2 == &P2
-TYPE &|P3 == &P3
-TYPE &|P4 == &P4
-TYPE &|P5 == &P5
-EXIT
DEFINE FILE CAR
COUNTRY1/A50 = COUNTRY;
END
TABLE FILE CAR
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR)).COUNTRY:.;
END
Output:
&PARM1 == ENGLAND OR FRANCE OR ITALY OR JAPAN OR W GERMANY
&PARM1 == ENGLAND,FRANCE,ITALY,JAPAN,W GERMANY
FILEDEF TEMPFILE DISK TEMPFILE.TXT
&P1 == ENGLAND
&P2 == FRANCE
&P3 == ITALY
&P4 == JAPAN
&P5 == W GERMANY
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015