cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to DB2 Database

Former Member
0 Kudos

Hi all,

I need to connect to DB2 Database using the JDBC Adapter.

Where do I need to provide the File name in JDBC adapter?

I need to send as Flat File,is there any option in JDBC Adapter like Content COnversion in File Adapter?

Please advice me.And I appreciate your help.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

<i>I need to connect to DB2 Database using the JDBC Adapter.</i>

First you have to deploy your drivers

DB2 JDBC driver, refer to:

http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/ad/t0010264.ht...

<i>Where do I need to provide the File name in JDBC adapter?</i>

You should give sender file name in the sender file adapter used to poll the file.

For the reciever(data base)..You have to mention the target database table name in the message mapping.

<i>I need to send as Flat File,is there any option in JDBC Adapter like Content COnversion in File Adapter?</i>

No....

JDBC reciever Adapter is used to send the data to the data base table which has some specific format ...where as file content converion is used where there is no specific structures like flat files.

Thanks,

sekhar

Former Member
0 Kudos

Hi Sekhar,

My scenario is IDOC XI JDBC. Iam using DEBMAS IDOC.

In my Target Datatype I have created a TABLE Field and Flag Field as per the Weblog :

<i><b>/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

How do i get the Table name and Flag Status from the IDOC to target Data type?

Please explain me.

Thank you.

bhavesh_kantilal
Active Contributor
0 Kudos

Mili,

You need to give the TABLE name in the TABLE tag . Make it a constant in your mapping.

The FLAG is just a column in the table in which data is being inserted in the blog 1772. Under ACCESS tag, you will create the datatype such that you give the name of the columns to which data is to be inserted.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thankyou for your prompt reply and I appreciate your help.

This scenario I am just using for testing.

So my TargetTable name is CUSTFILE and the Column name is Column name is CUSTDETAILS.

So in Message MAppings I need to map TABLE with CONSTANT(CUSTFILE) and FLAG with CONSTANT(CUSTDETAILS)the action field with CONSTANT(INSERT).

If I am wrong please correct me.

Thank you.

bhavesh_kantilal
Active Contributor
0 Kudos

Mili,

This is how your Target Data type will be,

<root>

<Statement>

<Test action=“INSERT”>

<table><b>CUSTFILE</b></table>

<access>

<CUSTDETAILS> </CUSTDETAILS>

</access>

</dbTableName>

</Statement>

</root>

I am assuming the following,

1. CUSTFILE is the name of the table~~ Map TABLE to a constant SUCTFILE

2. ACTION = INSERT ~~ Correct Map it to conastant INSERT

3. Under ACESS tag , you need to define the name of the columns. I CUSTDETAILS is one column name to which data is to be inserted, create the data type with a tag CUSTDETAILS and then map it with the value to be inserted.

Likewise you can add multiple TAGS under ACCESS and each will have the name of the column.

Regards,

Bhavesh

Former Member
0 Kudos

Thnak you Bhavesh and full points to you.

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Check this blog,

FIle to JDBC -- /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Regards,

Bhavesh