Linear Join using three files; two files twice
Linear Join using three files; two files twice
(OP)
Referencing thread243-1197791
I have three files that I need to join. J0 and J1 work. However, J2 and J3 (children of J0 and J1) do not... they retrieve the same data.
From Group:
FILEA.SM$FCOM/SM$FGP + FILEB.CWCO/CW$FL# + FILEC.IMLITM = ABC
To Group:
FILEA.SM$TCOM/SM$TGP + FILEB.CWCO/CW$FL# + FILEC.IMLITM = DEF
This is the join generated using the JOIN tool:
I have three files that I need to join. J0 and J1 work. However, J2 and J3 (children of J0 and J1) do not... they retrieve the same data.
From Group:
FILEA.SM$FCOM/SM$FGP + FILEB.CWCO/CW$FL# + FILEC.IMLITM = ABC
To Group:
FILEA.SM$TCOM/SM$TGP + FILEB.CWCO/CW$FL# + FILEC.IMLITM = DEF
This is the join generated using the JOIN tool:
CODE
JOIN
FILEA.FILEA.SM$FCOM AND FILEA.FILEA.SM$FGP IN FILEA TO MULTIPLE
FILEB.FILEB.CWCO AND FILEB.FILEB.CW$FL# IN FILEB AS J0
END
JOIN
FILEA.FILEA.SM$TCO AND FILEA.FILEA.SM$TGP IN FILEA TO MULTIPLE
FILEB.FILEB.CWCO AND FILEB.FILEB.CW$FL# IN FILEB AS J1
END
JOIN
FILEB.FILEB.CWLITM IN FILEA TO UNIQUE FILEC.FILEC.IMLITM IN FILEC AS J2
END
JOIN
FILEB.FILEB.CWLITM IN FILEA TO UNIQUE FILEC.FILEC.IMLITM IN FILEC AS J3
END
FILEA.FILEA.SM$FCOM AND FILEA.FILEA.SM$FGP IN FILEA TO MULTIPLE
FILEB.FILEB.CWCO AND FILEB.FILEB.CW$FL# IN FILEB AS J0
END
JOIN
FILEA.FILEA.SM$TCO AND FILEA.FILEA.SM$TGP IN FILEA TO MULTIPLE
FILEB.FILEB.CWCO AND FILEB.FILEB.CW$FL# IN FILEB AS J1
END
JOIN
FILEB.FILEB.CWLITM IN FILEA TO UNIQUE FILEC.FILEC.IMLITM IN FILEC AS J2
END
JOIN
FILEB.FILEB.CWLITM IN FILEA TO UNIQUE FILEC.FILEC.IMLITM IN FILEC AS J3
END
RE: Linear Join using three files; two files twice
Here's the JOIN syntax:
CODE
[LEFT_OUTER|INNER] hfld1 [AND hfld2 ...] IN hostfile [TAG tag1]
TO [UNIQUE|MULTIPLE] crfield [AND crfld2 ...] IN crfile [TAG tag2] [AS joinname]
END
Where TAG is defined as:
TAG tag1
Is a tag name of up to eight characters (usually the name of the Master File), which is used as a unique qualifier for fields and aliases in the host file.
TAG tag2
Is a tag name of up to eight characters (usually the name of the Master File), which is used as a unique qualifier for fields and aliases in cross-referenced files. In a recursive join structure, if no tag name is provided, all field names and aliases are prefixed with the first four characters of the join name.