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.
A couple ideas for new HOLD formats came up during one of the many 'hallway' meetings that always occur at Summit this year. The EMAIL idea is for something like this:
TABLE FILE DATA PRINT SOMETHING ON TABLE HOLD FORMAT EMAIL someone@somewhere END
This doesn't offer a way to include the subject line or body information unless it could accept standard form 'mailto' syntax:
ON TABLE HOLD FORMAT EMAIL 'mailto:someone@somewhere?subject=Your Report&body=Short Message'
Of course the ampersand before the 'body' argument is problematic to Focus. Maybe the standard url encoding form would be required: %26 .
Or maybe with special heading types/attributes, i.e.:
TABLE FILE DATA HEADING MAILTO "someone@somewhere" HEADING SUBJECT "Your Latest Report" HEADING BODY "Multi Line Info" "text text text" PRINT SOMETHING ON TABLE HOLD FORMAT EMAIL someone@somewhere END
In case anybody is thinking of pointing out that Report Caster is designed to do this very thing, I'd like to point out that it actually does a different kind of job that this idea doesn't address. Report Caster runs autonomously to distribute data to a known recipient base on a regular schedule. The idea presented in this post wouldn't replace that. This idea would likely be used, in example, where a customer enters data on a web page to update a form which triggers an acknowledgment email. I don't believe Report Caster is able to provide that unless coded at the API level and even then I think it's overkill.
On another day, and if this topic gets much attention, I'll post the code we use here at UNT Health Science Center. We use WebFocus to prepare the email payload and then either copy a POP3 format file into a Microsoft IIS SMTP Server PICKUP directory, or use Perl NET::SMTP as an SMTP Client to deliver the email message to our email gateway.This message has been edited. Last edited by: Kerry,
Posts: 14 | Location: Texas | Registered: May 16, 2006
I want to make sure many people get to review the idea before a NFR is created. That way it stands a better chance of being useful and is clear to IBI development staff how and what to implement. And, more important, if this isn't something that many customers would actually use, then the way we are doing it now, and sharing how we do that, will save lots of development time that IBI can use for better things.
Posts: 14 | Location: Texas | Registered: May 16, 2006
As there is already the TITLE syntax within style sheets, my vote would be for that to be utilised as the subject line. That might have a little more success in an NFR that expanding the HEADING keyword to allow additional suffixes. I always get wary when syntax is extended to such degrees that it takes a few releases to iron out the "features".
On the whole though, a great idea.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Interesting and it would be very useful. The one problem I see is that this would REQUIRE mail services/server to be available on the same platform as the WebFOCUS server, which could be a restriction on several platforms. I don't really see an easy way around that one. I'm sure there's a more complicated one.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Sending E-mail From a Procedure With File Content or an Attachment
E-mails can be sent from a procedure with the content of a specific file included in the body
of the email or as an attachment.
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, HTML, and so on.
data
Is the data or [app/]filename with the mail content.
So I'm guessing that all of those can be replace with &vars and parameterize the whole line. Takes ReportCaster out of the picture for the easy stuff. -- Keeping my fingers crossed for that one.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Same here. It took about 3 years to finall get to 7.6.x from 7.1 and now 7.7 is there (with 8 on the horizon.) Just have to wait until there are enough of those must-haves to justify the migration to a new version.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Alright, you don't have to make me jealous New features are nice to have but sometimes the impact on performance and other "features" outweigh the advantages.
As for the EDAMAIL, nice extension of the product but I suppose that I'll have to wait a while. However, I have been using a similar method that I wrote using VB Script, primarily for Excel files that need compaction first but it would work for any file.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Prior to 7.7 this is the solution I came up with. Seems like IBI has implemented about the same idea. Sendemail is a command line SMTP email client which supports Linux, BSD, OS X, Windows 98, Windows NT, Windows 2000, & Windows XP. SendEmail will allow you to attach files which you can attach reports or you can just send a link to a fex and the recipient can run the report.
We use it for example to update users automatical in case of reporting requests.
EX -lines 18 EDAMAIL &MAIL.EVAL; IBI@kempen.nl,
,
IBI informationrequest &INFOSUBJECT.EVAL,
,
,
bla bla bla blaa:
&INFONAAM.EVAL
-------------------------------------------------------------------------
Reuest will be executed by: &MEDEWERKER.EVAL.
OldStatus: &OUDSTATUS.EVAL.
NewStatus: &NIEUWSTATUS.EVAL.
-------------------------------------------------------------------------
Remarks: &MAIL2INHOUD
-------------------------------------------------------------------------
&MAILDISCLAIMER
-------------------------------------------------------------------------
Greetings,
department IBI
ibi@kempen.nl
-*
As you can see some amper values in this message which will be filled by the preceding report. The amper value &MAIL is the adress of the receveiver.
BTW we have found this in the documentation of ETL (Datamigrator) so I am not sure it can be used for everybody. Not sure if an attachement can be sent within this option.
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
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
I just tried EDAMAIL on 7.6.11 and it basically works. Thanks to FrankDutch for the example. I wasn't able to make sense of the other command line options, i.e., FOCEXEC or MASTER. I wasn't able to reference an external file of any kind to be sent as the body or as an attachment. I haven't found any explanation on how to use EDAMAIL in the manuals. In all cases, leaving the filetype blank caused the last argument to become the body of the email. All other variations I tried resulted in an email with an empty body and no attachment. It's a start and looks like this is a solution to my first post. It's more flexible than my idea, and in the form that works, allows me to generate an email for a variety of different reporting conditions.
I did need to set up SMTP_HOST on the WebFocus Server, Web Console, Workspace Configuration, General, E-Mail setting to point to my SMTP gateway. As Darin mentioned, there needs to be an SMTP server, but not necessarily on the same box. In every instance of being able to email from a Focus procedure, or any other language procedure, PHP, Perl, C, etc., there needs to be a SMTP server available. This can be your organizations SMTP gateway, your ISP's outgoing mail server, or a localhost SMTP server. You should be careful setting up a localhost that you don't become a spam relay. It's much better to use an already available SMTP gateway (in this text, I use the word gateway to mean an SMTP server that recognizes my WebFocus server's IP address as authorized to relay mail, or one that I have a login username and password for. An SMTP server is just the application that knows how to look up MX records and connect to other SMTP servers to relay mail.).This message has been edited. Last edited by: Steve F,
Posts: 14 | Location: Texas | Registered: May 16, 2006
you can send an attachement, but I never tried that. look at the first line in the code....it says "lines 18" and that is a variable number. the number of lines followed need to match that number I did not find any documentation so far, but it works
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
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006