Focal Point
how to created multi path files using table command

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

August 26, 2004, 09:07 AM
<Muthu>
how to created multi path files using table command
Hi all,

I have two multipath files with same layout.
How to merge these two files so that the resultant file will also have the same layout?
Can this be done using TABLE command?

can one of you help me.
August 26, 2004, 02:44 PM
Steve C
Are these FOCUS files? Are they identical in their field definitions? If yes, then you can use the USE command:

USE
c:\dir1\dir1\file1.foc as FILE1
c:\dir2\dir1\file2.foc as FILE1
END
TABLE FILE FILE1
etc.

This will process the two files as one.
August 26, 2004, 03:06 PM
<Muthu>
thanks Steve...

But my question is to merge these two Focus databases. that is merge file1 and file2 and dump the records into File3. File 3 must also have the same Multi segment ( multi path) structure.

say i tried performing this operation.

use
File1 as File1
file2 as File1
end

Table file file1
sum ---- by a
sum ---- by a by b
sum ---- by a by c
on table hold as File3 format focus index A B

But this statement provides me error
meaning : a by c not allowed. Instead a by b by c
should be used. But this is different from my database structure.

can you provide some idea to solve this.


thanks
Muthu
August 26, 2004, 03:54 PM
<Pietro De Santis>
The MORE command may work for you, if the field names are the same.

Table file file1
sum ---- by a
sum ---- by a by b
on table hold as File3 format focus index A B
more
file2
end
August 26, 2004, 03:55 PM
susannah
hmmm. can you post your source master? its true that a by c won't be allowed. Your BY fields do have to be consistent . It may be that your a-b segment and your a-c segment are sibling segments, and there is no relationship between b and c; I'm curious to see how you constructed your original multisegment focus files. Would you post? then it will be clearer to us. Is it even possible that your a-c segment in your source master is a virtual one, and joined to your a segment, just as your a-b segment is?
August 30, 2004, 08:41 AM
<Muthu>
Hi,

this is the master for the database

FILE=DATA1,SUFFIX=FOC,$
SEGNAME=A1SEG,SEGTYPE=S1,$
FIELD=A1 , ,A13 ,INDEX=I,$
SEGNAME=B1SEG,SEGTYPE=S1,$
FIELD=B1 , ,A10 ,INDEX=I,$
FIELD=IND1 , ,A1 ,$
FIELD=IND2 , ,A1 ,$
FIELD=IND3 , ,A1 ,$
FIELD=IND4 , ,A1 ,$
FIELD=IND5 , ,A1 ,$
FIELD=IND6 , ,A1 ,$
SEGNAME=C1SEG,SEGTYPE=S1,PARENT=B1SEG,$
FIELD=C_DATE, ,YYMD,MISSING=ON,$
SEGNAME=D1SEG,SEGTYPE=S3,PARENT=B1SEG,$
FIELD=DATE1, ,YYMD,MISSING=ON,$
FIELD=CSI2, ,A4 ,MISSING=ON,$
FIELD=ON3, ,A18 ,MISSING=ON,$
FIELD=CODE4, ,A1 ,MISSING=ON,$
FIELD=SALE5, ,A16 ,MISSING=ON,$
SEGNAME=E1SEG,SEGTYPE=S2,PARENT=B1SEG,$
FIELD=DATE2, ,YYMD,MISSING=ON,$
FIELD=FLD3 , ,A1 ,MISSING=ON,$