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.
This may be off some help, but if you have many number columns it will get messy and McGyver could be a better choice.
-* Create sample mfds and data
FILEDEF MASTER DISK test446.mas
-RUN
-WRITE MASTER FILENAME=TEST446, SUFFIX=FIX
-WRITE MASTER SEGNAME=TEST446
-WRITE MASTER FIELDNAME=NAME, FORMAT=A06, ACTUAL=A06, $
-WRITE MASTER FIELDNAME=NUM1, FORMAT=I02, ACTUAL=A01, $
-WRITE MASTER FIELDNAME=NUM2, FORMAT=I02, ACTUAL=A01, $
-RUN
FILEDEF MASTER DISK test447.mas
-RUN
-WRITE MASTER FILENAME=TEST447, SUFFIX=FIX
-WRITE MASTER SEGNAME=TEST447
-WRITE MASTER FIELDNAME=DEPT, FORMAT=A01, ACTUAL=A01, $
-WRITE MASTER FIELDNAME=NUM1, FORMAT=I02, ACTUAL=A01, $
-WRITE MASTER FIELDNAME=NUM2, FORMAT=I02, ACTUAL=A01, $
-RUN
FILEDEF TEST446 DISK TEST446.TXT
-RUN
-WRITE TEST446 John 15
-WRITE TEST446 Sam 25
-WRITE TEST446 Sally 57
FILEDEF TEST447 DISK TEST447.TXT
-RUN
-WRITE TEST447 A29
-WRITE TEST447 B15
-* Where code really begins This is for 2 columns of numbers, need to add more code for each extra column
SET ASNAMES=ON
TABLE FILE TEST446
PRINT COMPUTE
NUM2/I02=NUM1; AS NUM2
NUM2
BY NAME
ON TABLE HOLD
MORE
FILE TEST446
END
TABLE FILE HOLD
PRINT
COMPUTE CNTR/I04=IF NAME NE LAST NAME THEN 1 ELSE CNTR+1; NOPRINT
COMPUTE NUMBER/I02=IF CNTR EQ 1 THEN E02 ELSE E04;
BY NAME
ON TABLE HOLD AS PERSON FORMAT FOCUS INDEX NUMBER
END
-RUN
TABLE FILE TEST447
PRINT COMPUTE
NUM2/I02=NUM1; AS NUM2
NUM2
BY DEPT
ON TABLE HOLD
MORE
FILE TEST447
END
TABLE FILE HOLD
PRINT
COMPUTE CNTR/I04=IF DEPT NE LAST DEPT THEN 1 ELSE CNTR+1; NOPRINT
COMPUTE NUMBER/I02=IF CNTR EQ 1 THEN E02 ELSE E04;
BY DEPT
ON TABLE HOLD AS DEPT FORMAT FOCUS
END
-RUN
JOIN NUMBER IN DEPT TO ALL NUMBER IN PERSON
TABLE FILE DEPT
SUM CNT.NUMBER
ACROSS NAME ROW-TOTAL
BY DEPT COLUMN-TOTAL
END
This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
SET ASNAMES=ON
TABLE FILE TBLNAMES
PRINT NAAM
BY NUMBER1 AS NUMT
ON TABLE HOLD AS NAMES
MORE
FILE TBLNAMES
PRINT NAAM
BY NUMBER2 AS NUMT
END
TABLE FILE NAMES
PRINT NAAM
BY NUMBER
ON TABLE HOLD AS NAMES2 FORMAT FOCUS INDEX NUMT
END
Now you do the same with the department table (in the same fex)
Then you have two Focus format tables (NAMES2 and DEPT2) They both have the field NUMT as index field.
You can join these two tables as described before.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006