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] Alphanumeric to numeric
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Alphanumeric to numeric
 Login/Join
 
Platinum Member
posted
Hai

I have a field called IBAN, alphanumeric 18
This is the value 'NL38RABO0192345678'
I want the numeric part 0192345678, so I want a numeric 10 field, preferably packed 11, P11

So i used these functions in transformation in Datamigrator. In the GUI.

TO_NUMBER(EDIT(SUB_REK_ID,'$$$$$$$$9999999999'))
But then the system says: EXTERNAL FUNCTION OR LOAD MODULE NOT FOUND: TO_NUMBER

DB_EXPR(CAST(SUBSTR(SUB_REK_ID,9,10) AS DECIMAL (10,0)))
This one stays red, so not accepted

How can I transform this field in the Source Transforms Calculator in DataMigrator?

Regards
Ron

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 110 | Registered: August 29, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
How exactly do you us it (complete code if possible) ?
Are you sure that's it always start at the ninth digits ?

Because the following does work in a regular report
DEFINE FILE GGSALES
NUM_CD /I3 = TO_NUMBER(EDIT(PCD, '$999'));
END
TABLE FILE GGSALES
PRINT DST.PCD
      DST.NUM_CD
BY CATEGORY
END

Or TO_NUMBER() is not a valid function in Datamigrator as the error state...
If it's the case maybe you can use the following
NUM_FLD /P11 = EDIT(EDIT(SUB_REK_ID,'$$$$$$$$9999999999'));


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2161 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
 
DEFINE FILE CAR
IBAN/A18 WITH CAR = 'NL38RABO0192345678';
IBCHAR/A10=EDIT(IBAN,'$$$$$$$$9999999999');
IBNUM/I9=TO_INTEGER(IBCHAR);
IBPAC/P12.2=IBNUM;
END
TABLE FILE CAR
PRINT IBAN IBCHAR IBNUM IBPAC
BY COUNTRY
END 


WebFOCUS 8206, Unix, Windows
 
Posts: 1659 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thnx all

DB_EXPR(CAST(SUBSTR(SUB_REK_ID,9,10) AS DECIMAL (10,0))) works
problem was you have to use the WITH option to identify the logical home of the expression

case closed

Regards
Ron


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 110 | Registered: August 29, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Alphanumeric to numeric

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