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     [RESOLVED]How to Create XML Header for procedure output to be used in fusion charts?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[RESOLVED]How to Create XML Header for procedure output to be used in fusion charts?
 Login/Join
 
Platinum Member
posted
hi guys,

i create Fex procedure that produced data in XML format, i generate the entire document except the header it is not being generated when i use -WRITE dialog manager code.
also i cant aggregate the data to be appear once also, is it possible to be grouped under sub element?


my code and the output as following.
-* File writexml2.fex
APP FI MYXML2 DISK BASEAPP/MYXML2.XML
-RUN
-WRITE MYXML2 <chart caption=Retail Info By Country subcaption=Info About Cars xAxisName=Country yAxisName=Retail Coast numberPrefix=$>
-RUN
DEFINE FILE CAR
CRLF/A1=HEXBYT(10,'A1');
-*XML_CHARTS/A150='<chart caption=''Retail Info By Country'' subcaption=''Info About Cars'' xAxisName=''Country'' yAxisName=''Retail Coast'' numberPrefix=''$''>';
-*XML_CHARTE/A8='</chart>';
VALUEDATA/A10=PTOA(CAR.BODY.RETAIL_COST, '(P8.2)', VALUEDATA);
XML_LABEL/A200='<set label= '||''''||COUNTRY||''''||' value='|| '''' || VALUEDATA ||''''||'/>';
END
TABLE FILE CAR
PRINT
	CRLF
    XML_LABEL CRLF
ON TABLE SAVE AS MYXML2
END

-WRITE MYXML2 </chart>
-RUN
-END


output as following
  
<set label='ENGLAND' value=' 8878.00'/>
<set label='ENGLAND' value='13491.00'/>
<set label='ENGLAND' value='17850.00'/>
<set label='ENGLAND' value=' 5100.00'/>
<set label='JAPAN' value=' 3139.00'/>
<set label='JAPAN' value=' 3339.00'/>
<set label='ITALY' value=' 5925.00'/>
<set label='ITALY' value=' 6820.00'/>
<set label='ITALY' value=' 6820.00'/>
<set label='ITALY' value='31500.00'/>
<set label='W GERMANY' value=' 5970.00'/>
<set label='W GERMANY' value=' 5940.00'/>
<set label='W GERMANY' value='6355.00'/>        
<set label='W GERMANY' value='13752.00'/>
<set label='W GERMANY' value='14123.00'/>
<set label='W GERMANY' value=' 9097.00'/>
<set label='W GERMANY' value=' 9495.00'/>
<set label='FRANCE' value=' 5610.00'/> 



i am expecting the output as following:-

 
<chart caption='Monthly Sales Summary' subcaption='For the year 2006' xAxisName='Month' yAxisName='Sales' numberPrefix='$'>
<set label='ENGLAND' value=' 8878.00'/>
<set label='ENGLAND' value='13491.00'/>
<set label='ENGLAND' value='17850.00'/>
<set label='ENGLAND' value=' 5100.00'/>
<set label='JAPAN' value=' 3139.00'/>
<set label='JAPAN' value=' 3339.00'/>
<set label='ITALY' value=' 5925.00'/>
<set label='ITALY' value=' 6820.00'/>
<set label='ITALY' value=' 6820.00'/>
<set label='ITALY' value='31500.00'/>
<set label='W GERMANY' value=' 5970.00'/>
<set label='W GERMANY' value=' 5940.00'/>
<set label='W GERMANY' value='6355.00'/>        
<set label='W GERMANY' value='13752.00'/>
<set label='W GERMANY' value='14123.00'/>
<set label='W GERMANY' value=' 9097.00'/>
<set label='W GERMANY' value=' 9495.00'/>
<set label='FRANCE' value=' 5610.00'/> 
</chart>
 


i appreciate your help all of you.

Regards
Qalqili

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


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
 
Posts: 118 | Registered: February 08, 2006Report This Post
Expert
posted Hide Post
We are missing quite a bit of your post but a couple of notes.

1. I don't see a -WRITE in your posted code.
2. If you want to append to a file, include (APPEND to the end of your filedef.
3. You can use SUM and BY to group things in your TABLE request.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Something else to be aware of is when to use -RUN.

You need the one after the FILEDEF but you would also need one after the table request if you plan on writing to the file again.

There are many posts on appending to files if you search for then and they contain many tips and hints on what needs to go where.

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
Qalqili, looks like you pasted HTML code in the Quote.

You should be able to just post the HTML.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
i am sorry guys for missing code , i update my posted code,

i tried with APPEND but it is not recognize in dialog manager may be 76.10 not recogonize
the -APPEND command.


i appreciate your help
Regards
Qalqili


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
 
Posts: 118 | Registered: February 08, 2006Report This Post
Expert
posted Hide Post
Change the APP FI to
APP FI MYXML2 DISK BASEAPP/MYXML2.XML (APPEND

and make sure that you have a -RUN after your TABLE FILE END and before your -WRITE.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Hi Waz

it work perfect for first time , in second time it appended on the old file because of Append mod. kindly can you help me if i want to regenerate the file from scratch every time when i run the procedure. or if i can delete the file first by issuing os command or dos command at the header of the procedure then generate again from scratch will be greate for me.

Thanks in Advance
Qalqili

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


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
 
Posts: 118 | Registered: February 08, 2006Report This Post
Platinum Member
posted Hide Post
My Friend WAZ

i found it i search in dialog manager documentation and i found -DOS command it work very perfect.

-DOS del C:\ibi\apps\baseapp\MYXML2.XML
-RUN

Many thanks for all of you.
Regards
Qalqili


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
 
Posts: 118 | Registered: February 08, 2006Report This Post
Expert
posted Hide Post
Instead of issueing a DOS DEL, how about using the original APP FI, then reissue it with the append.

-* File writexml2.fex
APP FI MYXML2 DISK BASEAPP/MYXML2.XML
-RUN
-WRITE MYXML2 <chart caption=Retail Info By Country subcaption=Info About Cars xAxisName=Country yAxisName=Retail Coast numberPrefix=$>
-RUN
APP FI MYXML2 DISK BASEAPP/MYXML2.XML (APPEND
-RUN
DEFINE FILE CAR
CRLF/A1=HEXBYT(10,'A1');
-*XML_CHARTS/A150='<chart caption=''Retail Info By Country'' subcaption=''Info About Cars'' xAxisName=''Country'' yAxisName=''Retail Coast'' numberPrefix=''$''>';
-*XML_CHARTE/A8='</chart>';
VALUEDATA/A10=PTOA(CAR.BODY.RETAIL_COST, '(P8.2)', VALUEDATA);
XML_LABEL/A200='<set label= '||''''||COUNTRY||''''||' value='|| '''' || VALUEDATA ||''''||'/>';
END
TABLE FILE CAR
PRINT
	CRLF
    XML_LABEL CRLF
ON TABLE SAVE AS MYXML2
END
-RUN
-WRITE MYXML2 </chart>
-RUN
-END


The first -WRITE will overwrite the file, then it just appends.

It also removes those pesky OS calls.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     [RESOLVED]How to Create XML Header for procedure output to be used in fusion charts?

Copyright © 1996-2020 Information Builders