Focal Point
[Case-Opened] How to E-Mail the reports via Web Focus

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

April 07, 2011, 06:39 AM
Vinay Kumar
[Case-Opened] How to E-Mail the reports via Web Focus
Hi All,

Is there a way to send our reports to a mailbox thru webfocus?

I know one solution thru repost caster in MRE. I want to know whether this option is available in webfocus or not.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 07, 2011, 06:59 AM
FrankDutch
It is

But you need to use Reportcaster to start and send the reports.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 07, 2011, 11:48 AM
Vinay Kumar
Does this option available in 7.6.4 version? I couldn't able to find it!

If possible could you please put a screenshot over here!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 07, 2011, 12:42 PM
<JG>
You do not need caster.

Officially a 7702 New feature EDAMAIL.

However it has been supported in Data Migrator for a long time
and I have seen cases of it working in WF 7.1.x .

AS a DM server is exactly the same as a WF server it should be OK.

7.7.0.2 Documentation is limited to
quote:

Using EDAMAIL, the user can send an e-mail from a procedure with a File Content
or an Attachment. To add multiple e-mail recipients, just add a semi colon (Wink
in-between each e-mail recipients address. For example:
johnsmith@jpl.com;johndoe@nro.com

The syntax is:
EX EDAMAIL to, from, subject, [flag], filetype, data

Where: to - Is the e-mail recipient.
from - Is the e-mail sender.
subject - Is the e-mail subject.
flag - If flag is set to "a", the file is sent as an attachment.
Otherwise, it is included in the body of the e-mail.
filetype - Defines the data type, such as MASTER, FOCEXEC, and HTML.
data - Is the data or [app/]filename with the mail content.


It is possible that the filetype, parameter may not be needed.
If you want multiple to addresses put ; between them.
If you want multiple attachments put ; between them.

Try it and see.
April 07, 2011, 05:19 PM
Waz
I just tried EX EDAMAIL on 7.1.6 and 7.6.6, and it is there.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 08, 2011, 12:24 AM
Vinay Kumar
Thanks all for the responses!

I am getting the below error when i am using EDAMAIL.

EDAMAIL: Communication node is not found.
(ICM18822) Communication Error


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 08, 2011, 06:36 AM
FrankDutch
I do use the edamail function sometimes, but reportcaster gives you many more functionality like
Bursting
Scheduling
different and mixed output formats
logging of the results




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 08, 2011, 06:45 AM
Dave
This is great news... ( but I can't find in the help ?!! )

Can anyone provide a working (CAR) sample?

I can send an email. But no body and no attachment.

Can I make a PDF output and the send it?

Greets,Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 08, 2011, 06:52 AM
FrankDutch
Dave

do you have ETL/Datamigrator?

if so you can create a mail sending there.
try that and look in the code behind the gui
there you see the whole (simple code)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 08, 2011, 07:37 AM
Dave
Eh.. no?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 08, 2011, 10:27 AM
ABT
quote:
Originally posted by Vinay Kumar:
Thanks all for the responses!

I am getting the below error when i am using EDAMAIL.

EDAMAIL: Communication node is not found.
(ICM18822) Communication Error


Set your email configuration on the WebFOCUS server.

http://your_server_name:8121/webconsole
Workspace > Configuration
General > E-Mail

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
April 08, 2011, 11:40 AM
Vinay Kumar
Thanks ABT! I will try this and let you know the output! Smiler


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 09, 2011, 11:55 PM
Vinay Kumar
quote:
Originally posted by Dave:
This is great news... ( but I can't find in the help ?!! )

Can anyone provide a working (CAR) sample?

I can send an email. But no body and no attachment.

Can I make a PDF output and the send it?

Greets,Dave


Dave, i am also getting the same output! No Attachment, no body!

Could any one help us with an example!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 10, 2011, 12:40 PM
<JG>
quote:
This is great news... ( but I can't find in the help ?!! )

That's because there is none.
The only documentation I can find is the 7.7.0.2 NF documentation posted above repeated here

7.7.0.2 Documentation is limited to
quote:


Using EDAMAIL, the user can send an e-mail from a procedure with a File Content
or an Attachment. To add multiple e-mail recipients, just add a ;
in-between each e-mail recipients address. For example:
johnsmith@jpl.com;johndoe@nro.com

The syntax is:
EX EDAMAIL to, from, subject, [flag], filetype, data

Where: to - Is the e-mail recipient.
from - Is the e-mail sender.
subject - Is the e-mail subject.
flag - If flag is set to "a", the file is sent as an attachment.
Otherwise, it is included in the body of the e-mail.
filetype - Defines the data type, such as MASTER, FOCEXEC, and HTML.
data - Is the data or [app/]filename with the mail content.

April 10, 2011, 09:12 PM
Vinay Kumar
JG,

If i have to send email with an excel attachment. Then what would be the 'FILETYPE'?

EX EDAMAIL xxx@xxx.com, yyy@yyy.com, WebFocus Attachment, 'A', ??, [app path]


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 11, 2011, 05:29 AM
<JG>
Try XHT
April 11, 2011, 06:05 AM
Vinay Kumar
quote:
Originally posted by JG:
Try XHT


JG, It hasn't worked! Frowner


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 11, 2011, 01:52 PM
ira
ABT, thanks for the pointer. Dave, Vinay:
Went on the WFRS and into General, email settings. Entered my smtp host and sender. I then created a simple fex with the car file.
The contents of the report did show in my email. I have yet to get an attachment to work though. Done in (wf) 7611 (aix platform-5312)
 
TABLE FILE CAR PRINT COUNTRY
ON TABLE HOLD AS JUNK7 FORMAT ALPHA
END
-RUN
EX EDAMAIL aaa.bbb, ccc.,ddd, ira testing it, a,ftm,ibisamp/junk7.ftm 


Ira


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
April 11, 2011, 05:44 PM
Waz
Just a thought.

If all does not work...

We are on Unix here, and use the OS MAIL command, you may be able to use similar on your host.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 11, 2011, 11:52 PM
Vinay Kumar
quote:
Originally posted by ira:
ABT, thanks for the pointer. Dave, Vinay:
Went on the WFRS and into General, email settings. Entered my smtp host and sender. I then created a simple fex with the car file.
The contents of the report did show in my email. I have yet to get an attachment to work though. Done in (wf) 7611 (aix platform-5312)
 
TABLE FILE CAR PRINT COUNTRY
ON TABLE HOLD AS JUNK7 FORMAT ALPHA
END
-RUN
EX EDAMAIL aaa.bbb, ccc.,ddd, ira testing it, a,ftm,ibisamp/junk7.ftm 


Ira



Ira, i have made the settings in WFRS!

I used the same code which you have mentioned above, still not working.

The error is (FOC1562) EDAMAIL: FILE fmt NOT FOUND


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 12, 2011, 02:06 AM
Dave
Same here...

Tried it in EDA and MRE.

File 'FMT' not found...
That's odd.

EX EDAMAIL to, from, subject, [flag], filetype, data

'FMT' should be the filetype not the data.

Looks like the optional flag is considered to be the filetype. And the next parameter is indeed data. Not to be found...

The documentation says : If flag is set to "a", the file is sent as an attachment.

What?
a, A, 'a', 'A', "a" or "A"? Confused

A working sample would still be very nice.
( big lack in most WF documentation/help imho )

Grtz,D


_____________________
WF: 8.0.0.9 > going 8.2.0.5
April 12, 2011, 03:13 AM
Vinay Kumar
Dave, good we both are in same track! Smiler


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 12, 2011, 05:35 AM
<JG>
quote:
EX EDAMAIL to, from, subject, [flag], filetype, data



This works

TABLE FILE CAR
PRINT COUNTRY CAR MODEL DCOST
ON TABLE HOLD AS MAIL_FILE FORMAT EXL2K
END
-RUN
-MRNOEDIT EX EDAMAIL myemail@edamail.com, , edamail test,A,XHT,mail_file

Note the lack of spaces for the last 3 parameters and also NO .xht on the file name

Done via MRE hence the need for the -MRNOEDIT
April 12, 2011, 06:19 AM
Vinay Kumar
quote:
Originally posted by JG:
quote:
EX EDAMAIL to, from, subject, [flag], filetype, data



This works

TABLE FILE CAR
PRINT COUNTRY CAR MODEL DCOST
ON TABLE HOLD AS MAIL_FILE FORMAT EXL2K
END
-RUN
-MRNOEDIT EX EDAMAIL myemail@edamail.com, , edamail test,A,XHT,mail_file

Note the lack of spaces for the last 3 parameters and also NO .xht on the file name

Done via MRE hence the need for the -MRNOEDIT


JG, (FOC1562) EDAMAIL: FILE XHT NOT FOUND.

I haven't put .XHT on the file name, but still i am getting the same error!


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 12, 2011, 08:26 AM
<JG>
Did you make sure that you've removed any spaces from the string?
April 12, 2011, 08:40 AM
ABT
This worked for me (from Command Console, if that makes a difference):
TABLE FILE CAR
PRINT 
*
ON TABLE HOLD AS MAIL_FILE FORMAT EXL2K
END
-RUN

EX EDAMAIL my.email@address.com,,edamail test,A,XHT,MAIL_FILE


Curiously, the output only had one result...

This was successful, but gave a (FOC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS: 27.14 INCHES message. I got no mail.

TABLE FILE CAR
PRINT *
ON TABLE HOLD AS MAIL_FILE FORMAT PDF
END
-RUN

EX EDAMAIL my.email@address.com,,edamail test,A,PDF,MAIL_FILE


This worked absolutely and completely and gave the results expected:
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD AS MAIL_FILE FORMAT PDF
END
-RUN

EX EDAMAIL my.email@address.com,,edamail test,A,PDF,MAIL_FILE


- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
April 12, 2011, 09:30 AM
Vinay Kumar
JG,

It WORKED! Both PDF annd Excel, i could able to send them as attachment! Smiler


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 12, 2011, 09:41 AM
<JG>
Excellent news

Mark the thread as solved and close the case with IBI
April 12, 2011, 10:21 AM
ABT
quote:
Originally posted by JG:
Excellent news

Mark the thread as solved and close the case with IBI


And mark it as "we've documented the feature for you - you're welcome". Wink

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
April 12, 2011, 12:23 PM
George Patton
Don't mark it closed yet!

I'm also looking at this as a way to get excel reports to my users with a useful filename.

When I run the test from the console it works great.

However, now that I've followed all the directions to eliminate the spaces and create a HOLD file (I was doing a SAVE before)

TABLE FILE XX
.....
ON TABLE HOLD AS TEST FORMAT PDF
....
END

-RUN
EX EDAMAIL gp@chemo.com,,test report,A,PDF,TEST

Now I get:

0 NUMBER OF RECORDS IN TABLE= 310 LINES= 232
0 PDF FILE SAVED ...
EDAMAIL: Communication node is not found.
(ICM18822) Communication Error


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP