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: 6966
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: 6966
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


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