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 a current development where I need to perform a couple of repetative data manipulations. I decided to use functions for this as it could be useful across several reports.
The problem arises when I use two functions and the results I am getting are quite strange. If I use one or three functions then the results appear as expected, so it would appear that it is to do with just two functions.
Has anyone else experienced this?
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
A bit late for this now of course, but here is a mock up -
APP PREPENDPATH IBISAMP
DEFINE FUNCTION MERGE_IT(X/A10, Y/A16, Z/A24)
MERGE_IT/A10 = EDIT(X,'$$9$$') || EDIT(Z,'$$$$$$9$') || EDIT(Y,'$$$$$9$')
|| EDIT(Z,'$$$$$$$9$$$$$$9$') || (' ' | EDIT(Y,'$$9$$$9$$9')) || EDIT(Y,'$9$');
END
DEFINE FUNCTION CHOOS_IT(X/A10, Y/A16, Z/A24)
CHOOS_IT/A1 = IF ((X EQ 'ITALY') + (Y EQ 'ALFA ROMEO') + (Z CONTAINS 'SPIDER')) EQ 3 THEN 'Y' ELSE 'N';
END
-RUN
TABLE FILE CAR
PRINT COMPUTE CLONE_IT/A10 = MERGE_IT(COUNTRY, CAR, MODEL);
COMPUTE SELECT/A1 = CHOOS_IT(COUNTRY, CAR, MODEL);
COMPUTE DATE/DMtYY = (RCOST * 2.95) + (DCOST * 3.36) + (SEATS * 18) + 1;
COMPUTE TIME/I2 = EDIT(EDIT(HHMMSS('A8'),'99$'));
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT
ON TABLE HOLD AS TEMP_HLD FORMAT FOCUS
ON TABLE SET HOLDLIST PRINTONLY
END
TABLE FILE TEMP_HLD
PRINT DATE AS '' CLONE_IT AS '' TIME NOPRINT
WHERE SELECT EQ 'Y'
WHERE DATE EQ '&DMYY'
WHERE TIME LE 12
ON TABLE HOLD FORMAT HTMTABLE AS CRASH
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=48, $
TYPE=DATA, CLASS=01_04_f0_01, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Believe it
</title>
</head>
<style>
.01_04_f0_01 {font-size:48pts; color:#f00104;}
</style>
<body>
<center>
!IBI.FIL.CRASH;
</center>
</body>
</html>
-HTMLFORM END
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
By the time I got to my email, several others had already responded so I new it was an April's Fool item. But I had to run the code any way to see the output. Good one.