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.
TABLE FILE CAR PRINT CAR BY COUNTRY WHERE COUNTRY IN ('ENGLAND', 'FRANCE') ON TABLE HOLD AS HOLD_A FORMAT ALPHA END -* TABLE FILE CAR PRINT CAR BY COUNTRY WHERE COUNTRY IN ('ITALY', 'JAPAN') ON TABLE HOLD AS HOLD_B FORMAT ALPHA END -*********************************************** -* COMBINE FILES HOLD_A AND HOLD_B INTO HOLD_C * -* THEN FILEDEF HOLD_A WITH HOLD_C.FTM * -*********************************************** CMD COPY HOLD_A.FTM + HOLD_B.FTM HOLD_C.FTM FILEDEF HOLD_A DISK HOLD_C.FTM -* TABLE FILE HOLD_A PRINT CAR BY COUNTRY END
Jim
WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005
If you wish to take advantage of Tim's suggestion then you will have to ensure, as Tim states, that the structures are the same and this will apply to columns names as well as number of columns. e.g the .mas files must be identical. The other requirement would be to change your HOLD AS xxxxxx FORMAT ALPHA to FORMAT FOCUS as the USE statement relates to FOCUS files.
An alternative, to allow you to retain the ALPHA formatting of your data, would be to concatenate them, either by reissuing the FILEDEF with an (APPEND extension or, if using MVS, OS 390, Z/OS etc, take advantage of the DYNAM CONCAT facility. On other platforms you can use system commands to combine the files as per Jims post.
Assuming that you are Windows based then you would have code something like this -
FILEDEF HOLD1 DISK HOLD1.FTM
-RUN
TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
FILEDEF HOLD1 DISK HOLD1.FTM (APPEND
-RUN
TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
TABLE FILE HOLD1
PRINT *
END
-RUN
Just to emphasise the point, the file layouts MUST be identical if you use the USE syntax or they must have the same number of columns and formats if you use the FILEDEF method.
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