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.
I have an existing system that pounds out thousands of letters with unique materials in them, and a new requirement has come to light to create an archive on a drive at the same time it is returned to the user. I'm trying to figure out if there's a good way to retrofit what we have here. More or less this is what I'm trying to do:
TABLE FILE CAR PRINT * ON TABLE PCHOLD FORMAT PDF ON TABLE HOLD FORMAT PDF AS ARCHIVE END
I have a filedef for ARCHIVE and can get it to write to the drive, and I can get it to return to the client. The problem is that I can't get it to do both. It only does the second one it finds. I don't want to rewrite all of the calls to double-call the base report, so I'm trying to find a creative way to get both.
I'm on a two-tier so the idea of just rerouting the url to a folder where it can be returned the old-fashioned way is a bit harder than it needs to be.
Does anyone know of a sneaky way to get it to route to two destinations?
I've tried dropping the result into the approot and addressing it like this --
/ibi_apps/approot/madap_letters/vpdoc.pdf
. . . but I get this in return: "The requested resource (/ibi_apps/approot/madap_letters/vpdoc.pdf) is not available."
J.This message has been edited. Last edited by: John_Edwards,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
-SET &ECHO = 'ALL';
-*-- Set up the file name ----------------------------------
-SET &FILE_NAME = &YYMD || '_' || EDIT(&TOD,'99$99$99') || '_output01.pdf';
FILEDEF OUTPUT01 DISK baseapp/&FILE_NAME
-RUN
-*-- Create the report -------------------------------------
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON TABLE HOLD AS OUTPUT01 FORMAT PDF
END
-RUN
-*-- Display the report ------------------------------------
EX EDAGET PDF,baseapp/&FILE_NAME,B
-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
Alright, so this is more or less in, but I'm having a problem with big files, anything exceeding seven pages. My pdf gets cropped on the disk. I tried adding an LRECL to the Filedef but it didn't make a difference.
FILEDEF VPDOC DISK &ARCHPATH&FILE_NAME.pdf (LRECL 100000000
So it appears I'm hitting a hard limit on my size. Does this make any sense?
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
The LRECL won't help, it has nothing to do with the file size - it might affect the single record size of a text file.
Unfortunately, WebFOCUS generates unnecessarily large PDF and Excel files. According to dhagen in this post from 2013, EDAGET is a "high performance" way to move files, so it's surprising it cannot copy a seven page pdf file.
Here is another method of doing this, using meta refresh. This will only work if the reporting server and web server are on the same machine. It will also work if the web server can reference a folder on the reporting server. (I'm not sure what will happen if the file is large).
-SET &ECHO = 'ALL';
-*-- Set up the file name ----------------------------------
-SET &FILE_NAME = &YYMD || '_' || EDIT(&TOD,'99$99$99') || '_output01.pdf';
FILEDEF OUTPUT01 DISK baseapp/&FILE_NAME
-RUN
-*-- Create the report -------------------------------------
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON TABLE HOLD AS OUTPUT01 FORMAT PDF
END
-RUN
-*-- Display the report ------------------------------------
-HTMLFORM BEGIN
<HTML>
<HEAD>
<meta http-equiv="refresh" content="0; url=/approot/baseapp/!IBI.AMP.FILE_NAME;">
</HEAD>
</HTML>
-HTMLFORM END
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
Using this text fex, I had no problem with EDAGET, it created a pdf with file size of 1,013 KB.
-SET &ECHO = 'ALL';
-*-- Set up the file name ----------------------------------
-SET &FILE_NAME = &YYMD || '_' || EDIT(&TOD,'99$99$99') || '_output01.pdf';
FILEDEF OUTPUT01 DISK baseapp/&FILE_NAME
-RUN
-*-- Create the report -------------------------------------
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS OUTPUT01 FORMAT PDF
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
END
-RUN
-*-- Display the report ------------------------------------
-HTMLFORM BEGIN
<HTML>
<HEAD>
<meta http-equiv="refresh" content="0; url=/approot/baseapp/!IBI.AMP.FILE_NAME;">
</HEAD>
</HTML>
-HTMLFORM END
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
Sorry about that. This one works. It creates a file of 1,269kb. I tried to use EDAGET with a pre-existing pdf file (I used one of the WebFOCUS documentation files and I get an error: "The file is damaged and could not be repaired".
-SET &ECHO = 'ALL';
-*-- Set up the file name ----------------------------------
-SET &FILE_NAME = &YYMD || '_' || EDIT(&TOD,'99$99$99') || '_output01.pdf';
FILEDEF OUTPUT01 DISK test/&FILE_NAME
-RUN
-*-- Create the report -------------------------------------
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS OUTPUT01 FORMAT PDF
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
MORE
FILE CAR
END
-RUN
-*-- Display the report ------------------------------------
EX EDAGET PDF,test/&FILE_NAME,B
-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
Not exactly sure how to interpret what you wrote above, but the example you just provided with EDAGET produces the same error I'm seeing here, a partial pdf that throws an error when you get down a few pages. It appears to simply not be a complete pdf file. It appears EDAGET simply can't get a file much bigger than 200k.
That's a shame.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
Sorry for the confusing comment. All the code I added to this thread works on my local PC and also on our server. I should have stated that I ALSO tried to use EDAGET with the pre-existing file. Perhaps there's an issue with the web server.
Have you tried running a test on your localhost - the local environment accessible via Developer Studio?
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