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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Leading zeros in Alpha

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Leading zeros in Alpha
 Login/Join
 
Platinum Member
posted
Hi Focals,

how can i remove leading zeros in an alpha field?? Sometimes i have one, or two or three leading zeros. And i can't compare this with another alpha field. I know numbers in alpha is not so smart, but i can't change the data structures.

Regards

Christian

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


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
Guru
posted Hide Post
-SET &AF = '000123456';

-SET &NEWAF  = GETTOK(&AF,&AF.LENGTH,1,'0',&AF.LENGTH-1,'A&AF.LENGTH');



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
Guru
posted Hide Post
Use the TRIM function. It's documented in the Help file of Developer Studio. You can also take a look at the documentation online. TRIM is listed under Character Functions of the Using Functions documentation. http://ecl.informationbuilders...ns/source/opener.htm


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Platinum Member
posted Hide Post
If you are absolutely certain that your &var is numeric, you can use the INT function.

EricH
 
Posts: 164 | Registered: March 26, 2003Report This Post
Platinum Member
posted Hide Post
All this platinum around such a basic question.
Does this metal turns devaluated ?
As a tin member I'd like to remind TOTONUM/I5 = EDIT (TOTO);( If not numeric ---> 0; TOTO should not be Longer than ??? characters )
Any way, I reread TRIM, and thank you for this efficient advice
Cordially (but not so much) and Focusely


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Report This Post
Platinum Member
posted Hide Post
Hi Baillecl,
i think the amount of entries, says nothing about the skill level in WEBFOCUS. As a german proverb says "there are no stupid questions, only answers". Anyway thanks to all Focals, my problem is solved. That is the reason for joining the forum.

Thanks

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
Expert
posted Hide Post
nb: perhaps b/c EDIT won't translate to SQL.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
quote:
there are no stupid questions, only answers

Actually, there are stupid questions. They are the ones that do not get asked ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report 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] Leading zeros in Alpha

Copyright © 1996-2020 Information Builders