Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Leading zeros in Alpha
Go
New
Search
Notify
Tools
Reply
  
[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, 2010Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2008Reply With QuoteReport 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, 2003Reply With QuoteReport 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, 2007Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2003Reply With QuoteReport 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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

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

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.