Focal Point
[SHARING] FTP a TXT file from a Reportcaster job

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8757024426

September 24, 2012, 01:20 PM
Doug
[SHARING] FTP a TXT file from a Reportcaster job
I have searched FP (for: reportcaster ftp txt) and did not find a solution to my dilemma. That dilemma is that I need to create and FTP a test file (ON TABLE HOLD FORMAT ALPHA AS MYFILE.TXT) to a Unix destination.

I am able to do this for a HTM file (ON TABLE PCHOLD FORMAT HTML) quite nicely. I can create the desired txt file in an app folder and, separately, ftp it from there using a DOS batch or Unix Script. But, I want to do it in a single fex / ReportCaster job.

I am looking forward to hearing your replies. Big Grin

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 24, 2012, 06:36 PM
Doug
Cool I got it... Will explain later...
September 24, 2012, 11:08 PM
Rao D
Try using the below in your table request.

-IF &DELIVER NE 1 THEN GOTO PASSTHRU;
ON TABLE HOLD AS aa FORMAT &HOLDFORMAT
END
!cp -p &AA_EXT &DEST_FILE
-EXIT
-PASSTHRU

&AA_EXT -- should be like aa.ftm/aa.csv/aa.tab depending on the type of HOLD format that you choose
&DEST_FILE -- should have the file location and the file name.

THe above code works when your destination location has a mounting point to your reporting server.


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

September 25, 2012, 12:57 PM
Doug
Thanks Rao,
But, that has too many assumptions and I need to keep this within ReportCaster.

The final (simple as 1,2,3) answer:
1) The Code:
   TABLE FILE [this]
   PRINT [fields]
   END
2) Edit Task:
    A) "Save Report As: [filename.txt]"
    B) Report Format: ALPHA - Fixed Format Text File (*.ftm, *.txt)
3) Distribution:
    C) Use the FTP to a "Single File" to [filaename.txt]