473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

BCD from NT to MF somtimes garbled, sometimes not

we successfully code numeric data with java on NT (1.4.1_02) into
COMP-3 format, write that to a file, then attempt to write to
DB2/390/v6.1. viewing the intermediate file using a hex editor, it
looks correct. the target column is VARCHAR FOR BIT DATA.

if we remove the input decimal point (an xml file) from the input
data, some (but not all) occurrences of 90 (hex) end up on DB2 as 3F.
if we leave the decimal point in the input data, we get the correct
data, but a 0 (a nibble, not byte) where the decimal point had been
is in the intermediate file and the subsequent DB2 column.

the data stream is created as a zero filled ByteArray, which is
then overwritten with data.

my recollection is that COMP-3 has no real, only implied, decimal points,
so that 0-as-decimal-point messes things up.

does this sound remotely familiar to anyone?

thanks,
robert
Nov 12 '05 #1
4 1695
"robert" <gn*****@rcn.com> wrote in message
news:da**************************@posting.google.c om...
we successfully code numeric data with java on NT (1.4.1_02) into
COMP-3 format, write that to a file, then attempt to write to
DB2/390/v6.1. viewing the intermediate file using a hex editor, it
looks correct. the target column is VARCHAR FOR BIT DATA.

if we remove the input decimal point (an xml file) from the input
data, some (but not all) occurrences of 90 (hex) end up on DB2 as 3F.
if we leave the decimal point in the input data, we get the correct
data, but a 0 (a nibble, not byte) where the decimal point had been
is in the intermediate file and the subsequent DB2 column.

the data stream is created as a zero filled ByteArray, which is
then overwritten with data.

my recollection is that COMP-3 has no real, only implied, decimal points,
so that 0-as-decimal-point messes things up.

does this sound remotely familiar to anyone?

thanks,
robert


COMP-3 on mainframe has no decimal point in the data (it's implied as you
put it). I assumed that BCD works the same, but don't know for sure. I don't
know what BCD uses for plus/minus/neutral sign half-byte.
Nov 12 '05 #2
"Varchar for bit data" means "do not translate the bit patterns"; it is
typically used - for historical reasons - for binary formats such as (small)
gifs. For the most part, it has been superceded by BLOBs.

Since your client is on NT, your server on /390, and the BCD decimal formats
are different on the two platforms, this will not work. The correct
translation in DB2 is DECIMAL.

"robert" <gn*****@rcn.com> wrote in message
news:da**************************@posting.google.c om...
we successfully code numeric data with java on NT (1.4.1_02) into
COMP-3 format, write that to a file, then attempt to write to
DB2/390/v6.1. viewing the intermediate file using a hex editor, it
looks correct. the target column is VARCHAR FOR BIT DATA.

if we remove the input decimal point (an xml file) from the input
data, some (but not all) occurrences of 90 (hex) end up on DB2 as 3F.
if we leave the decimal point in the input data, we get the correct
data, but a 0 (a nibble, not byte) where the decimal point had been
is in the intermediate file and the subsequent DB2 column.

the data stream is created as a zero filled ByteArray, which is
then overwritten with data.

my recollection is that COMP-3 has no real, only implied, decimal points,
so that 0-as-decimal-point messes things up.

does this sound remotely familiar to anyone?

thanks,
robert

Nov 12 '05 #3
"Mark Yudkin" <my***********************@nospam.org> wrote in message news:<bo**********@ngspool-d02.news.aol.com>...
"Varchar for bit data" means "do not translate the bit patterns"; it is
typically used - for historical reasons - for binary formats such as (small)
gifs. For the most part, it has been superceded by BLOBs.

Since your client is on NT, your server on /390, and the BCD decimal formats
are different on the two platforms, this will not work. The correct
translation in DB2 is DECIMAL.
thanks. i'll define a column and give it a rip in the morning.

robert

"robert" <gn*****@rcn.com> wrote in message
news:da**************************@posting.google.c om...
we successfully code numeric data with java on NT (1.4.1_02) into
COMP-3 format, write that to a file, then attempt to write to
DB2/390/v6.1. viewing the intermediate file using a hex editor, it
looks correct. the target column is VARCHAR FOR BIT DATA.

if we remove the input decimal point (an xml file) from the input
data, some (but not all) occurrences of 90 (hex) end up on DB2 as 3F.
if we leave the decimal point in the input data, we get the correct
data, but a 0 (a nibble, not byte) where the decimal point had been
is in the intermediate file and the subsequent DB2 column.

the data stream is created as a zero filled ByteArray, which is
then overwritten with data.

my recollection is that COMP-3 has no real, only implied, decimal points,
so that 0-as-decimal-point messes things up.

does this sound remotely familiar to anyone?

thanks,
robert

Nov 12 '05 #4
"Mark Yudkin" <my***********************@nospam.org> wrote in message news:<bo**********@ngspool-d02.news.aol.com>...

the moral of the story: the devil is in the details. turns out that
another part of the system was string-izing the data, which was then
moved into the byte array. 90, 81, 8D, 9D don't have character
assignments in the standard windows code page; thus getting set to ?/3F
before extraction into the byte array. doh?!

thanks,
robert
"Varchar for bit data" means "do not translate the bit patterns"; it is
typically used - for historical reasons - for binary formats such as (small)
gifs. For the most part, it has been superceded by BLOBs.

Since your client is on NT, your server on /390, and the BCD decimal formats
are different on the two platforms, this will not work. The correct
translation in DB2 is DECIMAL.

"robert" <gn*****@rcn.com> wrote in message
news:da**************************@posting.google.c om...
we successfully code numeric data with java on NT (1.4.1_02) into
COMP-3 format, write that to a file, then attempt to write to
DB2/390/v6.1. viewing the intermediate file using a hex editor, it
looks correct. the target column is VARCHAR FOR BIT DATA.

if we remove the input decimal point (an xml file) from the input
data, some (but not all) occurrences of 90 (hex) end up on DB2 as 3F.
if we leave the decimal point in the input data, we get the correct
data, but a 0 (a nibble, not byte) where the decimal point had been
is in the intermediate file and the subsequent DB2 column.

the data stream is created as a zero filled ByteArray, which is
then overwritten with data.

my recollection is that COMP-3 has no real, only implied, decimal points,
so that 0-as-decimal-point messes things up.

does this sound remotely familiar to anyone?

thanks,
robert

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tony Marston | last post by:
I have just moved my website to a new hosting provider as the previous one went belly-up. Everything is now fine except for one thing - my counter script which generates a PNG image is sending out...
1
by: supercow | last post by:
Hello, Can anyone give me some pointers for solving my php serving problem? I'm relatively new to this. The problem is: all php output appears client side as garbled text (in firefox, and IE...
1
by: steve | last post by:
Hi, My Windows machine running PHP Version 4.3.4, Apache, mysql, Zend IDE has developed a strange problem whereas the html code coming out of php sometimes gets garbled in unpredicatable ways,...
0
by: Ethan | last post by:
I've been having some really weird problems with a very simple PHP app. I'm wondering if anyone can help me sort this out. I have a page that prints out the results of a MySQL query as an HTML...
6
by: Thomas Philips | last post by:
I have a question about deleting objects. My game has two classes, Player and Alien, essentially identical, instances of which can shoot at each other. Player is described below class...
2
by: Brian Cline | last post by:
I'm trying to print out some of my code from the VS.NET IDE (specifically, VB.NET), and when I do it prints out a bunch of garbled text as my code. The page header showing the location and file...
15
by: AES/newspost | last post by:
I do a large amount of web surfing using a Mac iBook with OS 9.2, and Netscape 7.0, and seldom encounter any page display problems -- except for MSNBC news pages such as, for example ...
3
by: John Dalberg | last post by:
I have a js file that is encrypted or garbled, See example below. Does it need a decrypter or does Javascript know how to deal with it right off? This js file is causing an error under IE. Any...
1
by: Jon Bev | last post by:
I have written a program in VB.net that sometimes has a problem with pressing the enter key in a multiline textbox. Sometimes it will press the button that you last clicked on the form instead of...
1
by: blbmdsmith | last post by:
Has anyone seen the following error while starting httpd: Starting httpd: httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: API module structure `python_module' in file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.