× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Assuming the database is EBCDIC, you probably need to add an EBCDIC tab character, x'05' not the ASCII one like this:

Tim.


________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Kyle Rainville <krainville@xxxxxxxxxxxxxxxxx>
Sent: 05 February 2020 02:20
To: midrange-l@xxxxxxxxxxxxxxxxxx <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: How to concatenate a tab in a Db2 view field?

I've been attempting to create a Db2 (the database is hosted on an IBM i,
running 7.3) view in which one of the fields (a character/char field) is
constructed by concatenating several different pieces of data together.
The catch is that between each of these fields of data, there needs to be
a tab present which is used for delimiting the fields in a DataMatrix
barcode.



The following is an ASCII and EBCDIC character set that I'm using as a
reference:



https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2FSSGH4D_16.1.0%2Fcom.ibm.xlf161.a&amp;data=02%7C01%7C%7Cbcb476b768f74a5bd87a08d7a9d98ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637164624133982855&amp;sdata=%2BdfGw02E0ZI2wnpv7B1dBDH7FXDC%2BGopM1t7ZQWstEU%3D&amp;reserved=0
ix.doc/language_ref/asciit.html



I'm using the hexadecimal code for a horizontal tab as follows to try and
concatenate the tabs in the character field that I'm constructing(e.g.):



select 'data1' || X'09' || 'data2' from

sysibm.sysdummy1;



Unfortunately, the only thing present, which results from the hexadecimal
code (X'09') appears to be one single space, as follows:



Result set:

data1 data2



When I use the resulting field in the view to generate a 2D barcode, there
are actually no spaces at all delimiting the fields (seen after scanning
said barcode). What's the trick to actually getting a tab to be rendered
in a Db2 view field? Is there a different code or function I should be
using? I've also tried using char(05) and char(09), but to no avail. In
addition, I've tried casting the hexadecimal code as a character, as
follows, but with no success:



select 'data1' || cast(X'09' as CHAR) || 'data2' from

sysibm.sysdummy1;



Any thoughts or ideas would be much appreciated!



Thanks,

Kyle

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&amp;data=02%7C01%7C%7Cbcb476b768f74a5bd87a08d7a9d98ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637164624133992863&amp;sdata=MYxyEUXOXYCp05AjLZkyeh5JwfeTkJZHAx6sMyUkAlg%3D&amp;reserved=0
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fmidrange-l&amp;data=02%7C01%7C%7Cbcb476b768f74a5bd87a08d7a9d98ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637164624133992863&amp;sdata=UqGInYS%2FU%2Fy8UToB1%2Fv4OZkX4%2Bbdc3IcMLbHNwdC17U%3D&amp;reserved=0.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazon.midrange.com&amp;data=02%7C01%7C%7Cbcb476b768f74a5bd87a08d7a9d98ca2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637164624133992863&amp;sdata=JzzSwQftHkPzwYq0w3duPe%2FUUh7BO%2FAazWvAgcrO5oE%3D&amp;reserved=0

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.