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] Pickup file name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Pickup file name
 Login/Join
 
Platinum Member
posted
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?

Thanks

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


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Virtuoso
posted Hide Post
Is it not possible to do the extraction with webfocus and let reportcaster do the bursting and email process?




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, 2006Report This Post
Expert
posted Hide Post
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

Master:
FILE=DIRINFO, SUFFIX=FIX, $

SEGNAME=FILEINFO, SEGTYPE=S0, $
FIELD=FILE_DTTM, FILE_DTTM, A20, A20, MISSING=OFF, $
FIELD=FILLER1, FILE_FILLER1, A05, A05, $
FIELD=DIR_IND, DIR_IND, A03, A03, $
FIELD=FILLER2, FILE_FILLER1, A03, A03, $
FIELD=FILE_SZ, FILE_SZ, A7, A7, MISSING=OFF ,$
FIELD=FILLERX, FILE_FILLERX, A1, A1, $
FIELD=SHORT_FILE_NAME, SHORT_FILE_NAME, A12, A12,$
FIELD=FILLER8, FILLER8, A1, A1, MISSING=OFF ,$
FIELD=LONG_FILE_NAME, LONG_FILE_NAME, A255, A255,$

This message has been edited. Last edited by: Francis Mariani,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
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


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Platinum Member
posted Hide Post
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


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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, 2006Report This Post
Expert
posted Hide Post
Here's an example using the APP commands and this should be platform independent, except for the directory name.

-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


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
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


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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, 2006Report This Post
Platinum Member
posted Hide Post
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


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Virtuoso
posted Hide Post
this site gives me so many ideas!
but enlarges my working hours, it is midnight here!




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, 2006Report This Post
Expert
posted Hide Post
To access another server, use APP MAP, add it to the edasprof.prf, under Workspace, Configuration, Configuration Files, Server Profile (7.6.1):

APP MAP DDNAME "//SERVERNAME/FOLDER1/FOLDER2/FOLDER3"

Then, you need to:

FILEDEF DDNAME DISK ETC.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Platinum Member
posted Hide Post
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


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Virtuoso
posted Hide Post
But then comes the next challange....
How are you going to mail that file to the proper client.




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, 2006Report This Post
Master
posted Hide Post
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.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Master
posted Hide Post
madams1,

See this thread: http://forums.informationbuild...331/m/2207017106/p/1 There was a lively discussion over the summer about this that I became a part of.

EDAMAIL

- 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
 
Posts: 561 | Registered: February 03, 2010Report 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] Pickup file name

Copyright © 1996-2020 Information Builders