Saggi,
LOSTHOLD is not overwriting NEWHOLD, rather NEWHOLD is not being created.
You can create as many HOLD files in one procedure as you want but each will have to be actioned. In your example you are issuing two ON TABLE HOLD calls within a single TABLE request. My understanding is that the last one will be actioned only. To do what you want in your example then -
-SET ASNAMES =ON
DEFINE FILE EMPL
NEW_STATUS/A10 = 'NEW';
LOST_STATUS/A10 = 'LOST';
END
TABLE FILE EMPL
SUM NEW_STATUS
CNT.ID AS 'NEW'
WHERE BEG_DATE LE '01/15/2005'
AND END_DATE GT '01/15/2005'
ON TABLE HOLD AS NEWHOLD
END
-RUN
TABLE FILE EMPL
SUM LOST_STATUS
CNT.ID AS 'LOST'
WHERE BEG_DATE LE '01/15/2005'
AND END_DATE LE '01/15/2005'
ON TABLE HOLD AS LOSTHOLD
END
-RUN
TABLE FILE NEWHOLD
PRINT *
END
Note that there are now TWO TABLE requests in your ONE procedure but both NEWHOLD and LOSTHOLD are avaialble. They will remain available during the run of this fex as they are held in a temporary folder on the reporting server known as EDATEMP. Each run of this fex will create them afresh in the respective folder for the agent that runs them and once the run has finished the files will be deleted.
You could also create TWO holds files within ONE TABLE request by issuing a HOLD after the TABLE request -
TABLE FILE EMPL
SUM LOST_STATUS
CNT.ID AS 'LOST'
WHERE BEG_DATE LE '01/15/2005'
AND END_DATE LE '01/15/2005'
ON TABLE HOLD AS HOLD1
END
-RUN
HOLD AS HOLD2
This will produce TWO identical HOLD files.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |