char for bit data

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

char for bit data

Post by admin »

Hi!

I use DataStage V4.1 and UDB V7.2.
When I code a job with DataStage Basic, I get problems with the datatype. In my UDB table there is a field defined as character for bit data. I would like to move this field from the source table to the target table.

layout of UDB tableA (source table):
FieldA1 char(5)
FieldA2 char(3)
FieldA3 char(10) for bit data only

layout of UDB tableB (target table):
FieldB1 char(5)
FieldB2 char(10) for bit data only

I use the ODBC connection. Which kind of data types should I use in the SQLBindCol and the SQLBindParameter calls?

When I use the binary data type, I get the following error:
An illegal SQL data type was supplied S1003.

When I use the character data type:
SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use.
--> So I tried to specify the char(10) to char(20) but I still get the
--> same
error I also tried to change the SQL an use the HEX(FieldB2), but this didnt help me either.

Thanks! Regards,
An
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

What is the data type when you import metadata from the UDB tables? Whatever it is, this is the type you should use. If you really are doing BCI function calls (which your reference to "SQLBindCol and SQLBindParameter calls" suggests), why not use SQLColumns, SQLColAttributes, SQLDescribeCol and, perhaps, SQLSpecialColumns functions to discover more?
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Ray,

When I import the metadata, it is binary 10. In the GUI jobs I have to change it to Char(20) and put the hex() function in the SQL of the source. When I try this in DataStage BASIC (by BCI function calls), I get errors.

In the Systemtables of UDB, I can see how the tables and fields are defined, but this doesnt halp me in DataSTage.

Regards,
An

-----Original Message-----
From: Ray Wurlod [mailto:ray.wurlod@Informix.Com]
Sent: dinsdag 16 oktober 2001 14:40
To: datastage-users@oliver.com
Subject: RE: char for bit data


What is the data type when you import metadata from the UDB tables? Whatever it is, this is the type you should use. If you really are doing BCI function calls (which your reference to "SQLBindCol and SQLBindParameter calls" suggests), why not use SQLColumns, SQLColAttributes, SQLDescribeCol and, perhaps, SQLSpecialColumns functions to discover more?
Locked