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.
We have a process currently that pulls data from a outside data warehouse and is put into a text file. This file contains statements for hundreds of people. Another process takes this text file and splits out each individual information and puts it into a PDF statement with naming the PDF file the persons "ID#".pdf. I would like to have Webfocus go into this directory and pull the filenames of each pdf file, look up the individuals email address and then email them the PDF document. I am searching on here on a way to pull a file name and read the contents of the file name. Is this possible?
ThanksThis message has been edited. Last edited by: Kerry,
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Here's an example on reading a directory listing of files - Windows version:
Focexec:
-SET &ECHO=ALL;
-SET &DIRINFO = 'C:\temp\dirinfo.ftm';
-SET &DATADIR = 'C:\Documentation\IBI';
-*-- Get the directory info --------------------------------
DEL &DIRINFO
-RUN
DOS DIR /X /-C &DATADIR > &DIRINFO
-RUN
FILEDEF DIRINFO1 DISK &DIRINFO
-RUN
TABLE FILE DIRINFO1
PRINT
LONG_FILE_NAME
BY LONG_FILE_NAME NOPRINT
WHERE LONG_FILE_NAME LIKE '%.PDF' OR LONG_FILE_NAME LIKE '%.pdf'
END
-RUN
The way the text file was setup it is not possible have Web Focus parse through it and change it to PDF and deliver. Now the PDF file is automatically created int he right format and the only way to find who's statement, is by the PDF filename. I was hoping that there is a way to get the filenames in a directory sort of like using C#'s directyInfo library and then pulling each ID#, locating there email address through a different database and sending it off. We do not have access to the first database and it would cost to much internally to have a different datafeed.
Thanks
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
What if DOS commands are denied on the Webfocus server by the systems area for security reasons. Is there another way? Thank you very very much Francis!
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
I don't think there's any other method of determining the contents of a folder, unless the folder is defined to WebFOCUS in the APP Path, then you could use the APP QUERY app HOLD command. Look for "Controlling the APP Environment" in the documentation. The command "Writes a list of all files in the application app in the file focappq.ftm in a temporary directory; the output is described by focappq.mas".
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
If the data is in a flat txt file webfocus can read it and do whatever you want. The other program can do it too and save it in individual file names. You bring up restrictions that would be a good reason to find a complete other solution.
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
Francis: Can the admin of the Webfocus server create a APP PATH folder that is actually located on another server? If this is the case, it would be ideal to go that route!
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Gosh! You're complicating things, one stumbling block at a time! What you want may take a combination of Windows and WebFOCUS to do and I've never done it, so, hopefully someone else will pipe up.
Cheers,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
You should not change the text file to pdf, but read the records and use them in a report and combine that info with the client/email database.
We do something like this, an external process copies the txt file every day to a directory on the webfocus server. I have created a master file on this text file and we can build a report based on these data.
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
Frank, the text file may not be the same format every time. To add to my madness, the company I work for likes to stick to a process and this is the process that has be give so far. I also do not want to recreate the wheel if the PDF process is already complete for me. Ia m going to see what I can do with the knowledge I have greatfully gained from you and Francis and see what comes of it tomorrow.
Francis: Sorry for tipping over the dominos!
Thank you!
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Back to the original post - WF/RC is not an "email" tool. It is used to distribute documents (via email) that it has created and can also attach external documents to the WF results, but it cannot dynamically decide which external document needs to be picked up and then email it out. Francis has referred to a couple of ways of determining the contents of a directory, but I don't think that's going to help in the solution. I'm with Frank on this one. By far, the easiest thing to do is going to be to read the text file (you can even create a dynamic email list from that same file) and let WF create the PDF burst it, and email it.
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
Francis: The following worked!!! Now I can use the filename minus the ".pdf" to lookup the ID number of the individual for their email address. The next item will be once the email portion is complete to then move all the files in the folder to a new archive folder named after the date so I will create a folder under the directory for archiving and then copy all the data into it and delete it. I believe I should be able to utilize APP COPY and APP DEL.
quote:
-SET &ECHO=ALL;
-SET &DATADIR = 'C:\Documentation\IBI';
APP MAP TEMPAPP1 &DATADIR -RUN
APP QUERY TEMPAPP1 HOLD -RUN
TABLE FILE FOCAPPQ PRINT FILENAME WHERE FILENAME LIKE '%.PDF' OR FILENAME LIKE '%.pdf' END -RUN
Currenly working @ Learning Circle Education Services Previously worked @ Nationwide Insurance Prod: WebFOCUS 7.6.11
Not, with report caster maybe calling an external program and issuing a mail send for each record. Hay that sounds like a good use of a WebFOCUS User Written Sub-Routine. Anyone have one that will take parameters and send an email.
Oh how I wish this post had not ended so abruptly in 2007....I am trying to do exactly this and not having much luck. Need to create an individual email for each student that has a hold on their record and email it to the student upon the hold being applied to there record. Any ideas? I've been searching all day. Thanks
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML