Focal Point
Join 2 focus files

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

February 21, 2008, 02:57 PM
Noel
Join 2 focus files
We are working on a project and within that project we are generating 2 foucs files. We tried to join them using the join tool in the procedure viewer but we cannot join the 2 focus files.

I hope somebody can teach us how to join these 2 files.

Below are the fiels that we tried to join
File 1:
FILENAME=ABCHDATA, SUFFIX=FOC , $
SEGMENT=SEG01, SEGTYPE=S1, $
FIELDNAME=DDAITX, ALIAS=E01, USAGE=A15,
TITLE='Item number', $
FIELDNAME=DDARQT, ALIAS=E02, USAGE=P12.3,
TITLE='Shipped,quantity', $
FIELDNAME=DDDUVA, ALIAS=E03, USAGE=P17.3,
TITLE='LC - net,sales amount', $
FIELDNAME=AVE, ALIAS=E04, USAGE=D12.2,
TITLE='AVE,AvePrice', $

File2:
FILENAME=abcdata, SUFFIX=FOC , $
SEGMENT=SEG01, SEGTYPE=S2, $
FIELDNAME=DDAITX, ALIAS=E01, USAGE=A15,
TITLE='Item number', $
FIELDNAME=yymm, ALIAS=E02, USAGE=I4, $
FIELDNAME=DDARQT, ALIAS=E03, USAGE=P12.3,
TITLE='Shipped,quantity', $
FIELDNAME=DDDUVA, ALIAS=E04, USAGE=P17.3,
TITLE='LC - net,sales amount', $

Thanks a lot in advance!


WebFocus 762 AS400 / DB2
February 21, 2008, 03:31 PM
Leah
I believe you need an index field on the files in order to do a join.


Leah
February 21, 2008, 05:07 PM
GinnyJakes
You only need an index on the field you are joining to in the target. The host file does not need an index.

If you currently do not have one on the target, assuming that is File2 in your post, then look up the REBUILD command. You will have to rebuild your current data into another file whose master has an INDEX=I for the DDAITX field.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
February 22, 2008, 05:20 AM
GamP
From the look of it, I suspect that you created thesse focus files using the technique ON TABLE HOLD FORMAT FOCUS. Be advised that you can also create an index in that same command: ON TABLE HOLD FORMAT FOCUS INDEX DDAITX. That way the file you created will be accessible using the join tool and will be joinable.

Hope this helps ....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 22, 2008, 09:19 AM
Noel
quote:
join tool and

Guys,

Thank you very much for the information that you shared....

Noel


WebFocus 762 AS400 / DB2