I'm running a maintain application that calls a fex, and within that fex I have a -INCLUDE. The -INCLUDE has set &variables. When maintain calls the program, I get an error.
My question is, how can I add a program with set variables.
Here's the code
-INCLUDE user_security
-INCLUDE get_user
-* &1 DOC NUMBER
-DEFAULT &1=' '
-* &2 DOC DATE FROM
-DEFAULT &2=' '
-* &3 DOC DATE TO
-DEFAULT &3=' '
-* &4 VENDOR NAME
-DEFAULT &4=' '
-* &5 FISCAL YEAR
-DEFAULT &5=' '
-* &6 INDEX
-DEFAULT &6=' '
-* &7 OBJECT
-DEFAULT &7=' '
-* &8 PCA
-DEFAULT &8=' '
-* &9 PROJ/WP
-DEFAULT &9=' '
-* &10 BALANCE FROM
-DEFAULT &10=' '
-* &11 BALANCE TO
-DEFAULT &11=' '
-* &12 RECORDLIMIT
-DEFAULT &12=500
-SET &ECHO='ALL';
-SET &WHR_DOCNBR = IF &1 NE ' ' THEN 'WHERE D_DOCNBR LIKE ' | '''' | &1 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_DTE_FR = IF &2 NE ' ' THEN 'WHERE DOCDATE GE ' | '''' | &2 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_DTE_TO = IF &3 NE ' ' THEN 'WHERE DOCDATE LE ' | '''' | &3 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_VNAME = IF &4 NE ' ' THEN 'WHERE VNAME LIKE ' | '''' | &4 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_FFY = IF &5 NE ' ' THEN 'WHERE FFY LIKE ' | '''' | &5 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_IC = IF &6 NE ' ' THEN 'WHERE IC LIKE ' | '''' | &6 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_OBJCT = IF &7 NE ' ' THEN 'WHERE D_OBJCT LIKE ' | '''' | &7 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_PCA = IF &8 NE ' ' THEN 'WHERE PCA LIKE ' | '''' | &8 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_PROJWP = IF &9 NE ' ' THEN 'WHERE D_PROJWP LIKE ' | '''' | &9 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_BAL_FR = IF &10 NE ' ' THEN 'WHERE BALCM0 GE ' | &10 | ' ;' ELSE ' ' ;
-SET &WHR_BAL_TO = IF &11 NE ' ' THEN 'WHERE BALCM0 LE ' | &11 | ' ;' ELSE ' ' ;
FILEDEF PSORT DISK psort.fex
FILEDEF ISORT DISK isort.fex
-RUN
DEFINE FILE ENC004
D_DOCNBR/A11 = DOCNO || '-' ||DOCNOSFX ;
D_OBJCT/A5 = OBJDET || AGYOBJ ;
D_PROJWP/A8 = PROJ || WP ;
-*TRANDATE/YYMD = HDATE(DOCDATE,'YYMD');
-*D_DOCDTE/MDYY=TRANDATE;
D_DOCDTE/MDYY=DOCDATE;
END
TABLE FILE ENC004
SUM D_DOCNBR
DOCNO
DOCNOSFX
FFY
PCA
IC
D_PROJWP
PROJ
WP
D_OBJCT
OBJDET
AGYOBJ
VNO
VESFX
VNAME
MIN.BALCM0
D_DOCDTE
DOCDATE
BY D_DOCNBR NOPRINT
BY DOCNO NOPRINT
BY DOCNOSFX NOPRINT
BY FFY NOPRINT
BY PCA NOPRINT
BY IC NOPRINT
BY D_PROJWP NOPRINT
BY PROJ NOPRINT
BY WP NOPRINT
BY D_OBJCT NOPRINT
BY OBJDET NOPRINT
BY AGYOBJ NOPRINT
BY VNO NOPRINT
BY VESFX NOPRINT
BY VNAME NOPRINT
BY D_DOCDTE NOPRINT
BY DOCDATE NOPRINT
-*WHERE ORG EQ '3790';
-INCLUDE psort
-INCLUDE isort
WHERE BALCM0 GT 0;
WHERE RECORDLIMIT EQ &12
-*ON TABLE SET ASNAMES ON
-*ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD
END
-RUN
Thanks,
jd
7.61, nt
Output: excel, pdf, html,