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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


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