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 am trying to collapse three fields into less than that based on which fields have missing data. My goal is to print all 3 comment fields if each one contains a comment. Otherwise, I want to print only the fields which contain data. I am getting close, but it does not quite work.
Here is some sample RAW DATA :
quote:
ASSIGNEE WO ------------- ---- II08 0355925 C1 205M-204M 213SE09 USE CUTTER HEAVY GREASE C2 C3 3/21/11 COMPLETE. REMOVED LIGHT DEBRIS/GREASE FROM MAI
SL7X 1578749 C1 C2 C3 MANHOLE NUMBER ___
Here is some sample OUTPUT :
quote:
XCMT1 205M-204M 213SE09 USE CUTTER HEAVY GREASE X2 X3
XCMT1 MANHOLE NUMBER ___ X2 X3
Here is sample code:
quote:
DEFINE FILE MMDB1 NEWASG/A1 = IF (ASSIGNEE NE LAST ASSIGNEE) THEN 'Y' ELSE 'N'; XCMT1/A70 = IF (NEWASG EQ 'Y') AND (COMMENT1 NE ' ') THEN COMMENT1 ELSE IF (NEWASG EQ 'Y') AND (COMMENT2 NE ' ') THEN COMMENT2 ELSE IF (NEWASG EQ 'Y') AND (COMMENT3 NE ' ') THEN COMMENT3 ELSE ' '; XCMT2/A70 = IF (NEWASG EQ 'Y') AND (COMMENT2 NE ' ') THEN COMMENT2 ELSE IF (NEWASG EQ 'N') AND (COMMENT1 NE ' ') THEN ' ' ELSE IF (NEWASG EQ 'N') AND (COMMENT1 NE ' ') AND (COMMENT2 EQ ' ') THEN COMMENT3 ELSE ' '; XCMT3/A70 = IF (NEWASG EQ 'N') AND (COMMENT1 EQ ' ') THEN ' ' ELSE IF (NEWASG EQ 'N') AND (COMMENT2 EQ ' ') THEN ' ' ELSE ' '; END
TABLE FILE MMDB SUM COMMENT1 AS 'C1 XCMT1 OVER COMMENT2 AS 'C2 XCMT2 AS 'X2 OVER COMMENT3 AS 'C3 XCMT3 AS 'X3 -* BY ASSIGNEE BY WO SKIP-LINE IF RECORDLIMIT EQ 10 END -RUN -EXIT
Does anyone have a suggestion?
Thanks!This message has been edited. Last edited by: Tomsweb,
Here is what I coded to solve the problem. I coded this on the mainframe so I never considered styling.
quote:
DEFINE FILE MMDB1 XC1/A15 = 'BEERS & SCHNITZ'; XC2/A15 = 'LETS EAT BRATS!'; XC3/A15 = 'ORIOLES AWESOME'; C1OK/A1 = IF XC1 EQ ' ' THEN '0' ELSE '1'; C2OK/A1 = IF XC2 EQ ' ' THEN '0' ELSE '1'; C3OK/A1 = IF XC3 EQ ' ' THEN '0' ELSE '1'; CABC/A45 = XC1 | XC2 | XC3 ; QCMT/A1=IF ((C1OK EQ '1') AND (C2OK EQ '1') AND (C3OK EQ '1')) THEN '1' ELSE IF ((C1OK EQ '1') AND (C2OK EQ '1') AND (C3OK EQ '0')) THEN '2' ELSE IF ((C1OK EQ '1') AND (C2OK EQ '0') AND (C3OK EQ '1')) THEN '3' ELSE IF ((C1OK EQ '0') AND (C2OK EQ '1') AND (C3OK EQ '1')) THEN '4' ELSE IF ((C1OK EQ '0') AND (C2OK EQ '0') AND (C3OK EQ '1')) THEN '5' ELSE IF ((C1OK EQ '0') AND (C2OK EQ '1') AND (C3OK EQ '0')) THEN '6' ELSE IF ((C1OK EQ '1') AND (C2OK EQ '0') AND (C3OK EQ '0')) THEN '7' ELSE '9' ; QFILE/A45 = IF QCMT EQ '1' THEN XC1 | XC2 | XC3 ELSE IF QCMT EQ '2' THEN XC1 | XC2 ELSE IF QCMT EQ '3' THEN XC1 | XC3 ELSE IF QCMT EQ '4' THEN XC2 | XC3 ELSE IF QCMT EQ '5' THEN XC3 ELSE IF QCMT EQ '6' THEN XC2 ELSE IF QCMT EQ '7' THEN XC1 ELSE ' '; END
TABLE FILE MMDB1 PRINT XC1 XC2 XC3 QCMT COMPUTE QFLN/I5 = ARGLEN(45,QFILE,'I5'); COMPUTE CMT1/A15 = IF QFLN GE 15 THEN SUBSTR(QFLN,QFILE,1 ,15,15,'A15') ELSE ' '; COMPUTE CMT2/A15 = IF (QCMT EQ '1' OR '2' OR '3' OR '4') THEN SUBSTR(QFLN,QFILE,16,30,15,'A15') ELSE ' '; COMPUTE CMT3/A15 = IF (QCMT EQ '1') THEN SUBSTR(QFLN,QFILE,31,45,15,'A15') ELSE ' '; -* BY ASSIGNEE AS 'ASGN' IF RECORDLIMIT EQ 3 END -RUN