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] CONVERTING -READ VARIABLE TO DECIMAL FORMAT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CONVERTING -READ VARIABLE TO DECIMAL FORMAT
 Login/Join
 
Silver Member
posted
I am using a -READ. I'm reading a value of '11,334', when I display the read &Variable in my footer the comma is not being read '11334' appears. How can I convert this &Variable to include the comma. I don't see any functions in the manual that cover this. I did find an 'ATODBL' function, but it is not a Dialogue Manager function. Anyone have any suggestions? Thanks!

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


WebFOCUS 8206
Exl2k
 
Posts: 36 | Registered: May 23, 2014Report This Post
Expert
posted Hide Post
Nope, DIY:

  
-SET &TEST_LEN  = ARGLEN(9, '&VARIABLE.EVAL', I3);
-SET &TEST_VAL  = IF &TEST_LEN LE 3 THEN &&VARIABLE ELSE
-                 IF &TEST_LEN FROM 4 TO 6 THEN EDIT(&VARIABLE,'999,999')
-                  ELSE EDIT(&VARIABLE,'999,999,999');

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Nice but here is a little more context on the idea.

-SET &VARIABLE = 222111000;


-SET &TEST_LEN = ARGLEN(9, '&VARIABLE.EVAL', I3);
-SET &TEST_VAL = IF &TEST_LEN LE 3 THEN &VARIABLE
- ELSE IF &TEST_LEN EQ 4 THEN EDIT(&VARIABLE,'9,999')
- ELSE IF &TEST_LEN EQ 5 THEN EDIT(&VARIABLE,'99,999')
- ELSE IF &TEST_LEN EQ 6 THEN EDIT(&VARIABLE,'999,999')
- ELSE IF &TEST_LEN EQ 7 THEN EDIT(&VARIABLE,'9,999,999')
- ELSE IF &TEST_LEN EQ 8 THEN EDIT(&VARIABLE,'99,999,999')
- ELSE IF &TEST_LEN EQ 9 THEN EDIT(&VARIABLE,'999,999,999')
- ELSE EDIT(&VARIABLE,'999,999,999');

-SET &VARIABLE = '$'| &TEST_VAL;

-TYPE &VARIABLE


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
Yep, Don is correct, My bad! Fixed the bad code too(the & name, left the rest)...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Hey, it takes a village Smiler


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Silver Member
posted Hide Post
Thank you guys so much, You all are the best. It does take a village. Don I had to add a trim function but I got it working. See Below:


-SET &TRMCASE = TRIM('L', '&VARIABLE.EVAL', 11, ' ', 11, 'A9');
-SET &TEST_LEN = ARGLEN(9, '&TRMCASE.EVAL', I3);
-SET &TEST_VAL = IF &TEST_LEN LE 3 THEN &TRMCASE
- ELSE IF &TEST_LEN EQ 4 THEN EDIT(&TRMCASE,'9,999')
- ELSE IF &TEST_LEN EQ 5 THEN EDIT(&TRMCASE,'99,999')
- ELSE IF &TEST_LEN EQ 6 THEN EDIT(&TRMCASE,'999,999')
- ELSE IF &TEST_LEN EQ 7 THEN EDIT(&TRMCASE,'9,999,999')
- ELSE IF &TEST_LEN EQ 8 THEN EDIT(&TRMCASE,'99,999,999')
- ELSE IF &TEST_LEN EQ 9 THEN EDIT(&TRMCASE,'999,999,999')
- ELSE EDIT(&TRMCASE,'999,999,999');


WebFOCUS 8206
Exl2k
 
Posts: 36 | Registered: May 23, 2014Report This Post
Platinum Member
posted Hide Post
It looks like the FPRINT function does this:

-SET &Integer = ' 1234567' ;
-SET &Integer = FPRINT(&Integer, 'P12C', 'A15');
-TYPE Integer = &Integer


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report 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] CONVERTING -READ VARIABLE TO DECIMAL FORMAT

Copyright © 1996-2020 Information Builders