[CLOSED] ftp'ing a file via report caster with the current date
i need to include the current day's date dynamically in the file name when ftp'ing a file via report caster. I've used the method below (which works) but it puts the date as a field within the report as well (unless I'm missing a step to exclude). Are there any other ways to do this? thanks
-SET &DATER = &YYMD ; -TYPE &DATER -RUN DEFINE FILE CAR FTP_FILENAME/A40 WITH COUNTRY = 'DCDC-Vdoxx-' || '&DATER' || '.txt' ; END SET ASNAMES=ON TABLE FILE CAR PRINT FTP_FILENAME AS DEST IF RECORDLIMIT EQ 1 ON TABLE NOTOTAL ON TABLE PCHOLD ENDThis message has been edited. Last edited by: Kerry,
December 21, 2012, 07:35 AM
Mike in DeLand
I'd like to know how to do that too.
Webfocus 8 Windows, Linux
December 21, 2012, 10:27 AM
PBrightwell
There is a disadvantage to retiring, I can't go see how I did this in the past. I know it isn't much help to say it can be done. I had to open a case when I first did this and there was something that had to be set in the Report Caster job.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
December 21, 2012, 12:05 PM
Mike in DeLand
"a disadvantage to retiring".
Good one!
Webfocus 8 Windows, Linux
December 21, 2012, 01:12 PM
Venkat-
Is this what you're looking for? If so, this is one way we can do it.
-SET &D=&YYMD ;
-SET &FILE1='DCDC-Vdoxx-' | &D | '.TXT' ;
FILEDEF TEST_DATA DISK "D:\your\ftp\output\path\&FILE1"
SET ASNAMES=ON
TABLE FILE CAR
PRINT COUNTRY CAR MODEL DEALER_COST RETAIL_COST
IF RECORDLIMIT EQ 1
ON TABLE NOTOTAL
ON TABLE SAVE AS TEST_DATA FORMAT COMT
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, SQUEEZE=ON, FONT=COURIER, $
ENDSTYLE
END
If you want to add both date and time in the file, then use
-SET &DT=&YYMD||&TOD ;
Hope this helps you!This message has been edited. Last edited by: Venkat-,
product release:8203 o/s: windows 10 expected o/p formats: HTML,EXCEL,PDF