If you are not using Report Caster, you need to write a batch program (Report.cmd) similar to below to call a t3i(Call_fex.t3i) file:
----------------Start batch------------------------
rem Report.cmd
set WFSHOME=C:\ibi\64bit\srv76\wfs\bin
set T3IDIR=E:\input\t3i
cd\
e:
cd %T3IDIR%
call %WFSHOME%\edastart -f %T3IDIR%\Call_fex
----------------End batch--------------------------
The code for Call_fex.t3i will look similar to below, This t3i will call the LOAD_DATA.fex:
----------------Start t3i--------------------------
-* Module name : Call_fex.t3i
%CONNECT
%BEGIN
EX LOAD_DATA
%END
%DISCONNECT
%STOP_SERVER
----------------End t3i----------------------------
The below fex will call the generate_report.fex only on first Saturday of every month and your logic to fetch data should be in the include fex (generate_report.fex)
----------------Start fex--------------------------
-* module name : LOAD_DATA.FEX
-SET &ECHO=ALL;
-SET &CURDATE=&YYMD;
-SET &CDAY=EDIT(&CURDATE,'$$$$$$99');
-RUN
DEFINE FILE CAR
CDATE/I8YYMD=&CURDATE;
CWDAY/A4 = DOWK(CDATE, CWDAY);
END
TABLE FILE CAR
PRINT CDATE CWDAY
WHERE COUNTRY EQ 'ENGLAND'
WHERE CWDAY EQ 'SAT';
WHERE &CDAY LE 7
ON TABLE HOLD
END
-RUN
-SET &CNT=&LINES;
-SET &GOTO = IF &CNT GE 1 THEN ':report' ELSE ':noreport';
-GOTO &GOTO
-:report
-TYPE Generate report today
-INCLUDE generate_report
-GOTO :END
-:noreport
-TYPE No need to generate report
-:END
-EXIT
----------------End fex-----------------------------
7.7.03