[Solved] Join two Focus Hold files linking Computed fields
Is it possible to join two Hold files (in focus format). The linked field is computed in both fields.
I can not seem to index the hold file with a computed fieldThis message has been edited. Last edited by: Daren,
Web Focus 7.6.5 JDE World
September 19, 2008, 11:04 AM
GinnyJakes
The source of the join doesn't have to be a FOCUS file, just the target.
What I would recommend for the other one is hold the data from the request that has the compute then re-table it as a hold format focus index idxfield. In the second table request, the computed field is now a real field.
It is kind of annoying that this happens. I also try to do it with ASNAMES and it just doesn't. I either wind up doing what I suggested above or store both fields in the FOCUS file.
This may be the issue: If you renamed the computed field...
COMPUTE name1/.. = ... ; AS 'name2'
...you have to specify the original name in the INDEX clause. The resulting fieldname and index name will reflect the renaming, assuming ASNAMES=ON or FOCUS.
SET ASNAMES=ON
TABLE FILE CAR
WRITE COUNTRY NOPRINT
AND COMPUTE CN/A2=EDIT(COUNTRY,'99'); AS ABR
BY CAR
ON TABLE HOLD FORMAT FOCUS INDEX CN
END
-RUN
CHECK FILE HOLD PICT
-RUN
? FILE HOLD