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 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
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.
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 QalqiliThis message has been edited. Last edited by: Qalqili,
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.