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.
Here is one way. Mainframe focus 7.11. I'm sure there are many others that are better. Using the Car file, this creates a report separating cars that have coupes and cars that do not have coupes.
TABLE FILE CAR PRINT BODYTYPE BY CAR UNDER-LINE BY MODEL END
PAGE 1
CAR MODEL BODYTYPE --- ----- -------- ALFA ROMEO 2000 GT VELOCE COUPE 2000 SPIDER VELOCE ROADSTER 2000 4 DOOR BERLINA SEDAN -------------------------------------------------------- AUDI 100 LS 2 DOOR AUTO SEDAN -------------------------------------------------------- BMW 2002 2 DOOR SEDAN 2002 2 DOOR AUTO SEDAN 3.0 SI 4 DOOR SEDAN 3.0 SI 4 DOOR AUTO SEDAN 530I 4 DOOR SEDAN 530I 4 DOOR AUTO SEDAN -------------------------------------------------------- DATSUN B210 2 DOOR AUTO SEDAN -------------------------------------------------------- JAGUAR V12XKE AUTO CONVERTIBLE XJ12L AUTO SEDAN -------------------------------------------------------- JENSEN INTERCEPTOR III SEDAN -------------------------------------------------------- MASERATI DORA 2 DOOR COUPE -------------------------------------------------------- PEUGEOT 504 4 DOOR SEDAN -------------------------------------------------------- TOYOTA COROLLA 4 DOOR DIX AUTO SEDAN -------------------------------------------------------- TRIUMPH TR7 HARDTOP --------------------------------------------------------
DEFINE FILE CAR COUPECNT/I1=IF BODYTYPE EQ 'COUPE' THEN 1 ELSE 0; END TABLE FILE CAR SUM COUPECNT BY CAR PRINT BODYTYPE BY CAR UNDER-LINE BY MODEL ON TABLE HOLD END DEFINE FILE HOLD MSG1/A30=IF COUPECNT GT 0 THEN 'CARS LINES WITH COUPES' ELSE 'CARS LINES WITH WITHOUT COUPES' ; END TABLE FILE HOLD PRINT BODYTYPE BY MSG1 NOPRINT BY CAR UNDER-LINE BY MODEL ON MSG1 SUBHEAD "<MSG1 </1" END
CAR MODEL BODYTYPE --- ----- -------- CARS LINES WITH COUPES
ALFA ROMEO 2000 GT VELOCE COUPE 2000 SPIDER VELOCE ROADSTER 2000 4 DOOR BERLINA SEDAN -------------------------------------------------------- MASERATI DORA 2 DOOR COUPE -------------------------------------------------------- CARS LINES WITH WITHOUT COUPES
AUDI 100 LS 2 DOOR AUTO SEDAN -------------------------------------------------------- BMW 2002 2 DOOR SEDAN 2002 2 DOOR AUTO SEDAN 3.0 SI 4 DOOR SEDAN 3.0 SI 4 DOOR AUTO SEDAN 530I 4 DOOR SEDAN BMW 530I 4 DOOR AUTO SEDAN -------------------------------------------------------- DATSUN B210 2 DOOR AUTO SEDAN -------------------------------------------------------- JAGUAR V12XKE AUTO CONVERTIBLE XJ12L AUTO SEDAN -------------------------------------------------------- JENSEN INTERCEPTOR III SEDAN -------------------------------------------------------- PEUGEOT 504 4 DOOR SEDAN -------------------------------------------------------- TOYOTA COROLLA 4 DOOR DIX AUTO SEDAN -------------------------------------------------------- TRIUMPH TR7 HARDTOP --------------------------------------------------------
END OF REPORT
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004
Thanks, ET, the above code worked fine. But apparently not what was wanted.
I need to isolate all people who hold ONLY apples and not any other fruit. How would I adjust the code to accomplish this? My sample scenario has no individuals with apples only, but that is what I need to identify.
I've been playing around, hoping to get the right output, but have not been successful.
Any ideas? Thanks, vickie
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004
This will give you cars that have only bodytype = coupe.
DEFINE FILE CAR COUPE_CNT/I5 = IF BODYTYPE EQ 'COUPE' THEN 1 ELSE 0; OTHER_CNT/I5 = IF BODYTYPE EQ 'COUPE' THEN 0 ELSE 1; TOTAL_CNT/I5 = 1; END TABLE FILE CAR SUM COUPE_CNT OTHER_CNT TOTAL_CNT BY CAR PRINT BODYTYPE BY CAR BY MODEL ON TABLE HOLD AS HOLD1 END -* TABLE FILE HOLD1 PRINT MODEL BODYTYPE BY CAR BY COUPE_CNT BY OTHER_CNT BY TOTAL_CNT WHERE COUPE_CNT GT 0 WHERE OTHER_CNT EQ 0 END
Jim
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005
Jim's solution could be reduced to one pass and no HOLD file by using the WHERE TOTAL selection statement.
DEFINE FILE CAR COUPE_CNT/I5 = IF BODYTYPE EQ 'COUPE' THEN 1 ELSE 0; OTHER_CNT/I5 = IF BODYTYPE EQ 'COUPE' THEN 0 ELSE 1; TOTAL_CNT/I5 = 1; END TABLE FILE CAR SUM COUPE_CNT OTHER_CNT TOTAL_CNT BY CAR PRINT BODYTYPE BY CAR BY MODEL WHERE TOTAL COUPE_CNT GT 0 WHERE TOTAL OTHER_CNT EQ 0 END
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003