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.
Is there a way to comma edit a variable that is being used from a -READ?
TABLE FILE CAR SUM SALES RETAIL_COST DEALER_COST ON TABLE SAVE AS SAVEIT END -RUN -READ SAVEIT &Sales.I6. &Retail.I7. &Dealer.I7. -RUN -TYPE &|Sales == &Sales -TYPE &|Retail == &Retail -TYPE &|Dealer == &DealerThis message has been edited. Last edited by: Spence,
WF 8 version 8.2.04. Windows. In focus since 1990.
Posts: 189 | Location: pgh pa | Registered: October 06, 2004
You could probably use function ARGLEN with or without TRUNCATE to determine how many digits are in the variables and then use EDIT to insert commas. An easier way though, is to convert the values to alphas with commas before you write them to the SAVE file:
TABLE FILE CAR
SUM
SALES NOPRINT
RETAIL_COST NOPRINT
DEALER_COST NOPRINT
COMPUTE SALES_ALPHA/A12 = FTOA(SALES,'(D7)','A12');
COMPUTE RCOST_ALPHA/A12 = FTOA(RETAIL_COST,'(D7)','A12');
COMPUTE DCOST_ALPHA/A12 = FTOA(DEALER_COST,'(D7)','A12');
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS SAVEIT
END
-*
-RUN
-READ SAVEIT &Sales.12. &Retail.12. &Dealer.12.
-RUN
-TYPE &|Sales == &Sales
-TYPE &|Retail == &Retail
-TYPE &|Dealer == &Dealer
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Not sure what you mean by "comma edit", -READFILE might be handy (but it's not available for 7.13):
quote:
You can also read a file using the -READFILE command. The -READFILE command reads a file by first reading its Master File and creating Dialogue Manager amper variables based on the ACTUAL formats for each field in the Master File. It then reads the file and, if necessary, converts the fields from numeric values to alphanumeric strings before returning them to the created variables. Display options in the USAGE formats are not propagated to the variables. The names of the amper variables are the field names prefixed with an ampersand (&).
-READFILE [app/]mastername
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