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 -- Format &variable from a -READ

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Solved -- Format &variable from a -READ
 Login/Join
 
Platinum Member
posted
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 == &Dealer

This 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, 2004Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks guys. Dan that works for me. Thanks for your help.


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report 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 -- Format &variable from a -READ

Copyright © 1996-2020 Information Builders