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: 202
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: 3051
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: 83
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 Store the data for fixed length COBOL Programming 1
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts in REXX,how to get sysprt info CLIST & REXX 9
No new posts VSAM ESDS File to store large data 4GB JCL & VSAM 5
No new posts Copy a PDS to a new PDS - why do I ne... TSO/ISPF 8
Search our Forums:

Back to Top