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.
If the table contains more than one record per key the report should print something like HEADER and it should be printed only when the key is changed. That HEADER is consist of COL1+COL2(concatenate). After the HEADER is printed the report should print COL2+COL3 for all records per key.So far so good but when there is only one record per key I need to print only the HEADER.
Here is an example of the output:
a1b1 <- HEADER COL1+COL2
b1c1 <- Line 1 COL2+COL3
b2c2 <- Line 2 COL2+COL3
b3c3 <- Line 3 COL2+COL3
a4b4 <- HEADER COL1+COL2
a5b5 <- HEADER COL1+COL2
a6b6 <- HEADER COL1+COL2
b6c6 <- Line 6 COL2+COL3
b7c7 <- Line 7 COL2+COL3
My idea was to use the HEADERS but when I have only one record per key that record should not be printed that means that I can use the HEADER.
SET ASNAMES = ON
DEFINE FILE FP1
ROWNUM/I9 = LAST ROWNUM + 1;
END
TABLE FILE FP1
SUM CNT.KEYS AS 'KEYCNT'
BY KEYS
PRINT
ROWNUM
COMPUTE HEADER/A5 = IF C1 GT 1 AND KEYS NE LAST KEYS THEN 'Y' ELSE 'N';
COMPUTE COLA/A10 = COL1 | COL2;
COMPUTE COLB/A10 = IF C1 EQ 1 THEN COL1 | COL2 ELSE COL2 | COL3 ;
BY KEYS
ON TABLE HOLD AS HOLD1
END
TABLE FILE HOLD1
PRINT COLB AS ''
BY ROWNUM NOPRINT
ON ROWNUM SUBHEAD
"<COLA "
WHEN HEADER EQ 'Y'
END