Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to created multi path files using table command
Go
New
Search
Notify
Tools
Reply
  
how to created multi path files using table command
 Login/Join
 
<Muthu>
posted
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.
 
Reply With QuoteReport This Post
Silver Member
posted Hide Post
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.
 
Posts: 44 | Location: New York City | Registered: May 23, 2004Reply With QuoteReport This Post
<Muthu>
posted
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
 
Reply With QuoteReport This Post
<Pietro De Santis>
posted
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
 
Reply With QuoteReport This Post
Expert
posted Hide Post
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?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Muthu>
posted
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,$
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to created multi path files using table command

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.