As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.
I want to combine the output (flat file) of 2 TABLE FILEs. Thus, I’m doing the following:
TABLE FILE table1 WHERE filter SUM fields BY fields ON TABLE SAVE FILENAME file.txt
MORE FILE table2 WHERE fields END
The above works fine. However, I want to make a slight change and use a DEFINE’d field instead of a real field in the SUM and BY. Thus, I put a DEFINE above the TABLE FILE and I used the DEFINEd field in the SUM and BY. That works fine if I just have one normal TABLE FILE. But if I want to use the DEFINEd field in the original, combined MORE, I get this error:
(FOC952) NO MATCH IS FOUND FOR THE FIELD OF MAIN REQUEST: REAL_NAME
If I put the DEFINE FILE above both the TABLE FILE table1 and the FILE table2, I get this error:
(FOC001) THE NAME OF THE FILE OR THE WORD 'FILE' IS MISSING
(FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND (FOC1517) UNRECOGNIZED COMMAND FILE FY2019 (FOC1517) UNRECOGNIZED COMMAND WHERE VENDOR_NO GE '1000000000' (FOC1517) UNRECOGNIZED COMMAND AND AOBJ GE '0101' (FOC1517) UNRECOGNIZED COMMAND AND AOBJ LE '0220';
Is there a way to combine output using MORE along with a DEFINEd field?
Thanks, MarkThis message has been edited. Last edited by: folkie,
WF 8.2.02 App Studio DataMigrator ReportCaster Windows Server 2016
When using MORE, all combined files must have the same number of field, same field name/format/length Sample
TABLE FILE CAR
PRINT RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
WHERE SEATS EQ 2;
ON TABLE HOLD AS TBL1
END
-RUN
TABLE FILE CAR
PRINT RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
WHERE MODEL CONTAINS '2 DOOR';
ON TABLE HOLD AS TBL2
END
-RUN
DEFINE FILE TBL1
FLD /A10V = 'TABLE 1';
END
DEFINE FILE TBL2
FLD /A10V = 'TABLE 2';
END
TABLE FILE TBL1
PRINT RETAIL_COST
BY FLD
BY COUNTRY
BY CAR
BY MODEL
MORE
FILE TBL2
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thanks for both of your replies. I went with the first, and simpler one. I moved the 2nd DEFINE right under the first DEFINE and before the (first) TABLE FILE and it worked.
Thanks again.
Mark
WF 8.2.02 App Studio DataMigrator ReportCaster Windows Server 2016