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     conversion from packed to alphanumeric excluding the decimal point and comma.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
conversion from packed to alphanumeric excluding the decimal point and comma.
 Login/Join
 
Silver Member
posted
1) I have a packed field var1 of format P8.2.
I want to convert it to alphanumeric format of A7.
Ex var1= 12345.67
I want it as var2(A7)=1234567.
I want to eliminate the decimal point.
Any help?

I had used 'ftoa' function to convert from decimal to alpha but the problem is that i am getting comma. how to eliminate it?
Ex = 12,345


FOCUS 7.1.1/ MF(OS/390)
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007Report This Post
Platinum Member
posted Hide Post
Look into PTOA. I'm pretty sure there were several posts previously on this.

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Platinum Member
posted Hide Post
Manash :
If nothing else works, this will...

DEFINE FILE CAR
FLD1/P8.2 WITH SALES = 12345.67;
FLD2/I8 = FLD1 * 100;
FLD3/A7=EDIT(FLD2,'$9999999');
END
TABLE FILE CAR
PRINT FLD1 FLD2 FLD3
WHERE READLIMIT EQ 1
WHERE RECORDLIMIT EQ 1
END


Gooooooooooood day !!
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Hello Manash,

Try the following. Notice the small "c" if the format of the FTOA function.

VARL/D7=VAR1 * 100;
VAR2/A7=FTOA(VARL,'(D7c)','A7');

Daniel
www.srl.co.il


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
Virtuoso
posted Hide Post
Use PTOA.
P_Field/P8.2 = 12345.67;
A_Field/A7 = PTOA(P_Field*100,'(P7)','A7');

This will not cause you any issues.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Silver Member
posted Hide Post
Thank you all for your valuable suggestions.


FOCUS 7.1.1/ MF(OS/390)
 
Posts: 40 | Location: Chennai, India | Registered: January 31, 2007Report This Post
Platinum Member
posted Hide Post
Using the FTOA with a small 'c' after the format ie. D15.2c will convert the long decimal no. without commas - ripper !!


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report 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     conversion from packed to alphanumeric excluding the decimal point and comma.

Copyright © 1996-2020 Information Builders