Focal Point
[CLOSED] appending a line at the begining of the file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7787086236

August 07, 2013, 06:54 AM
satish chennupati
[CLOSED] appending a line at the begining of the file
Hello,

i have two files Say FileA and FileB.

i want to read the data from FileA and append it at the begining of the FileB. FileB already contains 10 records for eg... now after append FileB should have 11 records but the record which got appended from FileA should be the first record in fileB.

i tried it with FileDef (append as well as using the putddrec(....) function but that didnt help.

any help in this regard is highly appriciated..

Satish

This message has been edited. Last edited by: <Kathryn Henning>,


Data Migrator 7.7
service manager 6.0, 6.1, 6.5 and 8
August 07, 2013, 09:37 AM
Doug
You want ot prepend, so how about appending fileb to filea, delete fileb, rename filea to fileb.
August 07, 2013, 10:03 AM
Francis Mariani
If you have Masters for both files and they have the same columns and formats, use the MORE command to merge the data of the two files:

TABLE FILE FILEA
PRINT *
ON TABLE HOLD AS FILEAB

MORE
FILE FILEB
END




Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server