Joined: 20 Oct 2006 Posts: 6968 Location: porcelain throne
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
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.
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
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.