IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need an info to store Hexadecimal value in DB2.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SENTHIL MURUGAAN
Warnings : 1

New User


Joined: 12 Jan 2013
Posts: 32
Location: India

PostPosted: Wed Jun 13, 2018 12:18 pm
Reply with quote

Is it possible to store Hexadecimal value in DB2?. If yes, then please share the procedure.

Advance thanks
Senthil
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 13, 2018 12:46 pm
Reply with quote

What research have YOU done to try to find an answer for yourself as this seems to be a fairly basic question.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jun 13, 2018 3:53 pm
Reply with quote

Everything is stored as as 1 and 0 bits. How that is interpreted is up to you. Hex is just a short-hand way of interpreting those bits.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 201
Location: Toronto, ON, Canada

PostPosted: Fri Jun 29, 2018 10:22 pm
Reply with quote

If the column is defined as CHAR then you can store any bytes of data. You can use the HEX() function to convert from bytes into a hexadecimal string.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2671
Location: NYC,USA

PostPosted: Sat Jun 30, 2018 4:50 am
Reply with quote

This is a beginners forum question
Perhaps why don’t you tell us the need to store it in hex?
Back to top
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 67
Location: Lower Saxony (DE)

PostPosted: Thu Aug 16, 2018 12:49 pm
Reply with quote

... And if you'd like to insert or update, you can use x'F0F1F2'...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Tivoli INFO/MANAGEMENT IBM Tools 0
No new posts Recreating VSAM cluster catalog info ... All Other Mainframe Topics 6
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts Need a Macro to compare datasets and ... All Other Mainframe Topics 2
Search our Forums:

Back to Top