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     [SOLVED] Alphanumeric to numeric

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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.04
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 115 | Registered: August 29, 2014Report 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.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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: 1853 | Location: New York City | Registered: December 30, 2015Report 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.04
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 115 | Registered: August 29, 2014Report 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] Alphanumeric to numeric

Copyright © 1996-2020 Information Builders