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     [Closed] Hexadecimal to Decimal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] Hexadecimal to Decimal
 Login/Join
 
Silver Member
posted
Hello,

I'm looking for some advise on converting Hex to Decimal values.

Something like '073D7AAE' needs to be converted to it's corresponding decimal '121469614'.

I want to perform this as a define or user function instead of creating temporary file for lookup.

Thanks in advance.

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 38 | Registered: July 25, 2016Report This Post
Expert
posted Hide Post
Search on Hexadecimal and the answer will be there...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Yes, I was able to find that before.

But like I requested, I'm wondering if there is any way to skip creating the look up file and simple way to get decimal value. Just like UFMT gives hex value.


WebFOCUS 8
Windows, All Outputs
 
Posts: 38 | Registered: July 25, 2016Report This Post
Master
posted Hide Post
I was able to convert Hex to Dec when using a SQL pass-through. You just need to make sure that you add a '0x' to the front of your HEX as you can see I did in the &SQLHEX variable:

 
-DEFAULTH &MYHEX = '073D7AAE'
-SET &SQLHEX = '0x' | &MYHEX;

ENGINE SQLMSS SET DEFAULT_CONNECTION YOUR_SERVER_NAME
SQL SQLMSS PREPARE SQLOUT FOR

SELECT '&MYHEX' AS HEX, CONVERT(INT, &SQLHEX.EVAL) AS DEC

END

TABLE FILE SQLOUT
PRINT *
END 



I'm sure that you could use the DB_EXPR function if you don't want to use a SQL Pass-through.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report 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     [Closed] Hexadecimal to Decimal

Copyright © 1996-2020 Information Builders