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]PCHOLD AS .. FORMAT XML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]PCHOLD AS .. FORMAT XML
 Login/Join
 
Guru
posted
Hi guys,

Anybody familiar with naming XML files and holding them in a browser?

 
TABLE FILE CAR
PRINT *
ON TABLE PCHOLD AS TSTREPORT FORMAT XML
END 


Gives some generated filename (I've changed redirection settings / xml /save = yes)

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


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Not sure to understand.

PCHOLD is not "holding" in a browser, it's returning the result to your PC. PCHOLD = hold to PC

As per example, when you want to create data that can be used in an HTML control (drop list, list box, radio, …) you need only need to do
TABLE FILE CAR
BY COUNTRY
ON TABLE PCHOLD FORMAT XML
END

so be "associating" the fex above from the SETTINGS of a control in HTML the country list will be available to this control


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
Guru
posted Hide Post
Hi Martin,

In this case I really want to save it in the browser.
  PCHOLD AS TESTREPORT FORMAT EXL07
gives the right filename (testreport.xlsx) for the Excel, but for XML this is not working (@000020.xml).

We are scheduling these kind of reports in Reportcaster and giving them dymaic file names this way (ON TABLE PCHOLD AS &NAME FORMAT XML). If someone has a hint to dynamically populate a filename in the task, than that would be a good workaround as well.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
To physically save "data" on disk, you should better do this
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS myfolder/TSTREPORT FORMAT XML
END

PCHOLD is just in your PC memory


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
Guru
posted Hide Post
Yes, but I want it as a save file in the browser, not on disk. Smiler


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
You cannot save in a browser or I misunderstand your request.
If you save on disk then the file will be available to the browser as per my sample.


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
Guru
posted Hide Post
It's like PCHOLD FORMAT EXL07, then the Excel file is send to the browser and there it will be shown in the browser or you get a "save as" depending on the redirection settings. So with saving in the browser, I mean getting the "save as" option in the browser.

The question is, how to get the right filename if you do that with XML.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Hoooo, much clear.

Go to Client Administration Console and then Redirection Settings.
Change the one for xml file from No to Yes for the Save option.
You will be prompted for to save the result, then you can put your own file name.

Should do the trick


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
Guru
posted Hide Post
Yes the redirection works fine, the problem is that it's not using the filename that I've specified, but some random generated filename.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Seems not possible to have your own defined file name with PCHOLD AS myFileName FORMAT XML except when using HOLD AS myFileName FORMAT XML
PCHOLD XML usually used for "dynamic" control list values generation so, the name is not important

With the redirection properly setup, you are able to have the save prompt but not with your specified name which IMHO is not a show stopper

You may should open a case with TS and share the answer with us


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
Guru
posted Hide Post
thanks for your input. The reason we use this is that with this, we get a dynamic filename for emails in Reportcaster. This works for all formats except xml.

I'll have to look further to create a dynamic filename in Reportcaster.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
Hi Frans,

I'm not sure what version of 8.2 you are usng but in 8.2.05 there are two redirection settings ("Redirect" and "Save As"). I can't compare earlier versions as I do not have them to hand but the following code gives me the option to download (save to browser Wink) as the correct filename.

TABLE FILE CAR
SUM RCOST DCOST
BY COUNTRY
BY CAR
ON TABLE PCHOLD AS TESTXML FORMAT XML
END


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, 2004Report This Post
Expert
posted Hide Post
As I see it in 8204M Gen48 open in IE.
XML open the results directly in the browser.
XLSX uses the 'AS' name.

See you at Summit?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Thanks Tony, I've tested it on 8205, but there I get @0000010.xml as filename. I'll open a case, seems we have another setting overrulling this.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
I had a similar issue with the naming of CSV files, and as Tony mentioned
quote:
redirection settings ("Redirect" and "Save As")
it worked as desired after changing the 'Save As' settings to 'yes'.
I hope this works for you as well.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Hi Doug,

Thanks, but the redirect settings are OK. It seems to be some other configuration setting, I'm checking it with techsupport.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
NP. Let us all know what they provide as a resolution...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
This is solved by using an & in the "Save Report as" field in Reportcaster. The Parameter entry works in 8205, not on 8202.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report 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]PCHOLD AS .. FORMAT XML

Copyright © 1996-2020 Information Builders