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     [SOLVED] Multiple ON TABLE (PC)HOLD commands with one TABLE request?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Multiple ON TABLE (PC)HOLD commands with one TABLE request?
 Login/Join
 
Platinum Member
posted
Hi All,

Can you have multiple HOLD commands with one TABLE request?

I would like to use ReportCaster to create a file that I can copy to a network drive and also have RC distribute a file via email attachment.

RC seems to need the file created by PCHOLD in order to use the file as an attachment to an email. But I would also like to create a file so I can copy/archive it to a network drive.

Can there be multiple HOLD commands in one TABLE request like ...

TABLE FILE CAR
PRINT ...
ON TABLE PCHOLD FORMAT XLSX
ON TABLE HOLD AS WHATEVER FORMAT XLSX
END

This would give me a file ReportCaster would recognize and also a file named "whatever" that I could use for an archived file.

Thoughts?

FYI - I don't want to use 2 TABLE requests.

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
All signs point to no. Frowner But you can have multiple tasks in one report caster job. So have two TABLE FILE commands one for distribution and one for archive.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
With ON TABLE HOLD AS ... the file gets put in the TEMP directory ... Is there any way to tell ReportCaster to get the file from there? Seems stupid to have to run the TABLE request twice just to get what is needed.


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
Unless you use APP HOLD command, the temp file is only there during the session. This is so other executions don't over write the temp file and give you the wrong results. The alternative is to create a staged HOLD file and run two requests off of the HOLD file. This is only if the extraction of the data necessary for the two requests takes a long time. But since you're scheduling this creating 3 tasks, one for extract and 2 for the two hold jobs doesn't seem worth it.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
This is what I remember seeing somewhere ...

If your environment supports the SET parameter SAVEMATRIX, you can preserve the internal
matrix of your last report in order to keep it available for subsequent HOLD, SAVE, and SAVB
commands when the request is followed by Dialogue Manager commands. For details on
SAVEMATRIX, see the Developing Reporting Applications manual.

But I can't find any example of how to use it.

Does anyone know if this works?


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
With only one task in the schedule

-REPEAT TWOFMT FOR &I FROM 1 TO 2
TABLE FILE CAR
PRINT RETAIL_COST
BY COUNTRY
BY CAR
-IF &I EQ 2 THEN GOTO FMT2;
ON TABLE HOLD AS appslocation/FileName FORMAT XLSX
-GOTO ENDFMT
-FMT2
ON TABLE PCHOLD FORMAT XLSX
-ENDFMT
ON TABLE SET BYDISPLAY ON
END
-RUN
-TWOFMT

It's important that the last format in the loop is the PCHOLD one for distribution.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
I'd never heard of this SET command. Search for SAVEMATRIX in this https://webfocusinfocenter.inf...pdfs4/wfappslang.pdf

Here's what I tried and it worked like a charm:

  
SET SAVEMATRIX=ON
APP HOLD IBISAMP
TABLE FILE CAR
PRINT CAR BY COUNTRY
ON TABLE HOLD AS DELETE_LATER
END
-RUN
PCHOLD FORMAT XLSX
-RUN


I ended up with a delete_later.ftm delete_later.mas in ibisamp and Excel opened with the report output. Seems like all you have to do is run the report and after the END type the next hold command you want by itself.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Sweet ... Thank You

This worked with ReportCaster as well.


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
Good One


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
In fact, you only need the SAVEMATRIX command if you issue some DM commands (which, I do not know) between all your HOLDs/SAVEs.
The following is perfectly legal and has been in use since time immemorial:
  
-SET &ECHO=ALL;
TABLE FILE CAR
PRINT CAR SALES BY COUNTRY
ON TABLE HOLD AS H1
END
HOLD AS H2 FORMAT ALPHA
SAVE AS SA
SAVB AS SB
!TYPE H1.MAS
!TYPE H2.MAS

You will have 4 files which can be used subsequently in the procedure.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
Another issue ... I run the following code via ReportCaster ...

SET SAVEMATRIX=ON
FILEDEF RPTOUT DISK FocalPoint.xlsx
TABLE FILE CAR
HEADING
"Report:   FocalPoint"
"Run Date: &DATEMDYY"
"Run Time: &TOD"
PRINT
COUNTRY
CAR
MODEL
SEATS
DEALER_COST
RETAIL_COST
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE HOLD AS RPTOUT FORMAT XLSX
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty, $
TYPE=REPORT, TITLETEXT='FocalPoint', $
TYPE=HEADING, SIZE=10, JUSTIFY=LEFT, $
ENDSTYLE
END
PCHOLD FORMAT XLSX
-RUN


In my code I also copy the spreadsheet named FocalPoint.xlsx to a network drive so I can keep the file. I also email the file created by the "PCHOLD FORMAT XLSX" statement to myself via ReportCaster. The problem is that both reports are not the same. The report that is copied to the network drive includes styling and a TAB named FocalPoint ... the file attached to the email from ReportCaster has no styling and the Tab name is Sheet1.

Does anyone know how to make both reports the same?

Thanks


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Virtuoso
posted Hide Post
The method that you used is "out" of the style sheet since the PCHOLD FORMAT XLSX is placed after the ENDSTYLE.

So except if someone else have another option, I suggest that you use the option that I posted on : November 13, 2018 11:53 AM


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Hi Martin,

That is what I will do for now.

Thanks


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report 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     [SOLVED] Multiple ON TABLE (PC)HOLD commands with one TABLE request?

Copyright © 1996-2020 Information Builders