Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Email and Create a copy of the report in a network folder

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Email and Create a copy of the report in a network folder
 Login/Join
 
Gold member
posted
I had scheduled a job in report caster which was intend to send the report in an email. But in addition i should create a copy of that report in a network drive folder also.

So while scheduling i would select the distribution format as email which will send an email. But how do i create a copy of the report in network drive. If the report exists already, it should overwrite that. Can anyone post the sample code for the same.

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


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
 
Posts: 63 | Registered: January 12, 2011Report This Post
Master
posted Hide Post
Unless someone knows a different way, the portion of the job that produces the report has to run twice, first to a file, second for email, then depending on your environment, ftp/copy the file to the desired folder.

Code would look something like this:
-SET &PASS=0;
-REPEAT ENDLOOP 2 TIMES
-SET &HOLD=IF &PASS EQ 0 THEN 'HOLD AS RPT1' ELSE 'PCHOLD';
 TABLE FILE CAR
 PRINT *
 ON TABLE &HOLD FORMAT EXL2K
 END
? FILEDEF
-RUN
-SET &PASS=&PASS+1;
-ENDLOOP
-*
-*  FTP/COPY FILE TO FOLDER
-*
   execute OS command(s) to place file in the desired folder

The ? FILEDEF is to get the filename so after you have it, it can be removed.

What we do is just produce the report in a file, ftp to the folder, put a link to the report on our dashboard. Saves on email traffic.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
I email/ftp my reports in one pass. Hope this helps.

  
-*set an &var to desired file name
-SET &EFILE='CAR.xls';
-*filedef the file
APP FI CAR DISK &EFILE
-RUN

-** CREATE REPORT
TABLE FILE CAR 
PRINT *
ON TABLE HOLD AS CAR FORMAT EXL2K
END

-*send email
-*get edatemp directory and concatenate to 
-* file name.
-SET &ARGLEN = ARGLEN(120,TEMPPATH(120,'A120'),'I2')+1;
-SET &TP    = TEMPPATH( &ARGLEN, 'A&ARGLEN.EVAL') || '&EFILE.EVAL';

-*set &var for email address
-SET &EADDR1 = 'mmouse@disneyland.com';

-** make call to javamail to email report
! /opt/java6/jre/bin/java SendFileWithAuth &EADDR1 &TP.EVAL "Car Rpt Attached" "Car Rpt"

-** SQL Stored Procedure to FTP file to web server.
-FTP_FILE

ENGINE SQLMSS SET DEFAULT_CONNECTION SQLDBname
-RUN

SQL SQLMSS
EX MSDB.dbo.sp_start_job N'FTPGetCarRpt'
END
-EXIT


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Email and Create a copy of the report in a network folder

Copyright © 1996-2020 Information Builders