July 11, 2013, 10:33 AM
JackieTdate/timestamp in file name
Hi,
I would like to include a date at the end of a file name. I have a weekly report (distributed via email) that will generate the same file name over again.
This is problematic as I would like to store the files in the same folder, but cannot if the names are not differentiated by a date.
I could manually put the date in every time I move the file to the shared drive, but I think there MUST be a way for reportcaster to do this for me.
I am using Webfocus Version: 7702
July 11, 2013, 11:01 AM
DougThat would be a function within your FEX, not sure that RC has that ability. try to create the final file, appended with a date, within your fex.
Do something like:
-SET &reportname = 'report' || &DATE;
TABLE FILE CAR
PRINT
CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD AS &reportname FORMAT EXL2K
END
Note that you may need to set your redirection settings and set save to yes for exl2k or whatever your format. &DATE is populated by default. to see other variables you can use, do:
-? &
July 11, 2013, 11:24 AM
RSquaredWe do something like this
/*
DEFINE FILE
HIDDEN_SORT/I9 = &YSTRDY0;
END
TABLE
PRINT
BY
HIDDEN_SORT NOPRINT
BY
BY
BY
ON TABLE PCHOLD FORMAT EXL2K
*/
Set the RC Schedule to BURST the report.
July 11, 2013, 01:58 PM
FrankDutchThere are some other options
- Report library, to save the file in several versions
- save the file direct in the folder without a mail.