Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How are low values and high vlaues stored in table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
arraiyan.parveen
Warnings : 1

New User


Joined: 10 Feb 2010
Posts: 5
Location: chennai

PostPosted: Mon Oct 25, 2010 2:22 pm    Post subject: How are low values and high vlaues stored in table
Reply with quote

How are low values and high vlaues stored in table for Alphanumeric field

for eg : FRST_NM CHAR(15)

what is the value to be given for this field to test if this field has low values or high vlaues
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Oct 25, 2010 2:33 pm    Post subject:
Reply with quote

you really need to do some reading.
this (and other subjects) are part of fundamental knowledge base
that you should have before you even start a job in computers.

high-value(s) and low-value(s) are COBOL figurative constants
and represent the internal storage of Hexidecimal X'FF' and X'00' respectively.

a column with datatype character can contain any of the 256 ebcdic hexidecimal values
(or 512 when the db2 is configured for UTF)

the test of a char column's value is the same regardless of the value being tested.

now, can you code in sql WHERE COL = Low-values
NO
but you can code your sql WHERE COL = :host-variable (where the HV contains low-values)
or WHERE COL = x'000000000000000000000000000000'
there are other syntax available, but suggest you find them yourself in the manuals,
hyperlinks (buttons) at the top of the page.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Oct 25, 2010 5:29 pm    Post subject:
Reply with quote

this post appears to be the same as:
http://www.ibmmainframes.com/viewtopic.php?p=252559&highlight=#252559
and this:
http://ibmmainframes.com/viewtopic.php?t=51864

experience has shown that multibyte fields can often contain
1 low-value or high-value char and then spaces.

1st you need to determine if the complete 15 char are all binary zeroes,
binary 'FF' or spaces.
if the answer to that interrogation of the DB is true,
you can use the
x'000000000000000000000000000000' ,
x'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ,
and ' ' literals in your case statement.

but, if there is a combination of low-values/high-values and spaces
you case statement will not hold true.

your example in the locked topic where you provide your own case solution shows that the resulting value to be 1 char *.
now, when you have an accurate and complete description of the possible values and the required results, reply and someone will provide you with a solution.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us