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     Convert packed decmal to alpha....?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Convert packed decmal to alpha....?
 Login/Join
 
Member
posted
I have a packed decimal field 11 digits in length (6 bytes actual) that I want to convert to alpha format. When I used the EDIT command, it was unpredictable, as I found in the CREATING REPORTS manual the following statement:
"Also, converting a number with more than nine significant digits in floating-point or packed-decimal foramt may produces an incorrect result."

It sure does! Mad

Does anyone have a suggestion to convert this data?

Thanks!
Jackie
 
Posts: 19 | Location: Little Rock, AR | Registered: July 21, 2003Report This Post
Gold member
posted Hide Post
EDIT internally uses a 4 byte integer field as its base so you're limited to what can be stored in an I4 field which is a low 10 digit number.

To convert large packed numbers to alpha, convert it to F or D format first, then use the FTOA subroutine the syntax of which is as follows:

FTOA (infield, '(format)', outfield);

infield: The name of the field to be converted.
format: The format of the original field with any desired edit options.
outfield: The name of the field to receive the alphanumeric value.


These DEFINEs should work (ORIGNAL_FIELD is the P11 packed field):

D_NUMB/D11 = ORIGINAL_FIELD;
ALPHA_NUMBER/A11 = FTOA (D_NUMB, '(D11)', ALPHA_NUMBER);

Hope that helps.

-CB
 
Posts: 55 | Location: New York | Registered: March 07, 2003Report 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     Convert packed decmal to alpha....?

Copyright © 1996-2020 Information Builders