February 21, 2008, 02:57 PM
NoelJoin 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!
February 21, 2008, 03:31 PM
LeahI believe you need an index field on the files in order to do a join.
February 21, 2008, 05:07 PM
GinnyJakesYou 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.
February 22, 2008, 05:20 AM
GamPFrom 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 ....
February 22, 2008, 09:19 AM
Noelquote:
join tool and
Guys,
Thank you very much for the information that you shared....
Noel