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] Numeric (packed or decimal) to Alpha

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Numeric (packed or decimal) to Alpha
 Login/Join
 
Gold member
posted
I am trying to change a numeric format to alpha. The format in the file is P12.3 (ie. 69.23 ) I need this filed to be 8 characters long; so I am trying to change the format to A8. I have tried
ALPHA/A8=PTOA(PACKED, '(P13.2)', 'A8'); and the output was blank.
I was able to change the format to D8.2. Then I tried ALPHA/A8=FTOA(PACKED, '(D8.2)', 'A8'); and the output was .00. I've even tried edit, but then I just get 00000000. What am I doing wrong? I know the field isn't blank, because when I print the field there is data in it; and when I print the D8.2 format, the same data is in it. What do I need to do to change it to alpha or at least specify the output to always be 8 characters in length. Thanks!

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


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report This Post
Gold member
posted Hide Post
Your output field is too small. Try A17 with the P12.3 or A12 with D8.2...

This is from the documentation:

Alphanumeric
Is the name of the field that contains the result, or the format of the output value
enclosed in single quotation marks. The length of this argument must be greater than
the length of number and must account for edit options and a possible negative sign.


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Expert
posted Hide Post
Using PTOA with the format P12.3 will give you output of 12 chars. its all in the edit options on the field.

C will add commas, M will add the char $, etc

If you know that the size of the number will be less than 9 characters, including formatting characters, Then use 8.3.


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
Virtuoso
posted Hide Post
quote:
ALPHA/A8=PTOA(PACKED, '(P13.2)', 'A8');


As was said, you have to account for the length of the field. So:
  
ALPHA/A8=EDIT(PTOA(PACKED, '(P13.2)', 'A13'),'$$$$$99999999');


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
mrguru and Danny-SRL, my output was .00. Waz, that worked! Since I didn't want 3 character right of the decimal, I tried 9.2, but that gave me 9 characters in lenght. Then I tried 8. 2 and that worked. Thanks for all your help!!


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 59 | Registered: June 18, 2009Report 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] Numeric (packed or decimal) to Alpha

Copyright © 1996-2020 Information Builders