Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
merging files
 Login/Join
 
Member
posted
Hello to All,

I have created two ftm files and I wish to merge the two into one file.

I have created them using 'ON TABLE HOLD filename FORMAT ALPHA'.
Can someone tell me how to merge them together?

thanks
David


Dev Studio 8.1.0.4, App Studio 8.1.5m, Reporting Server 8.1.4, InfoAssist, Active Technologies, Windows 2003 Server, Windows7
 
Posts: 20 | Location: Wheaton College | Registered: April 25, 2005Report This Post
<Tim Howard_ABCBS>
posted
Try using the use statement. The qualifications are that both file structures need to be the same.

USE
HOLD1 AS HOLD1
HOLD2 AS HOLD1
END
 
Report This Post
Platinum Member
posted Hide Post
Hi Donna,

Here's one way that works for me:

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, 2005Report This Post
Expert
posted Hide Post
Donna,

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, 2004Report This Post
Master
posted Hide Post
djackson,

Here is a easy way. Lets say you called the files; FILEA and FILEB. If you just want to report from them then all you have to do is

TABLE FILE FILEA
PRINT ...
MORE
FILE FILEB
ON TABLE HOLD AS FILEC
END

TABLE FILE FILEC
PRINT 
...
END


Hope this helps




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders