Page 1 of 1

DB2 table to store special format data

PostPosted: Tue Sep 15, 2009 11:11 pm
by pgandhi671
Hi,

My requirement is I am going to get flat file with all flavor like packed, date format, occurs 60 times and I have to create the table to store all the data how do I define or handle those special format?

Re: DB2

PostPosted: Wed Sep 16, 2009 1:08 am
by dick scherrer
Hello and welcome to the forum,

Leave the occurs behind - db2 doesn't support repeating groups. . .

You need to map the contents of the flat file to one or more database tables (if this has not already been done).

After creating the table(s), you would run a LOAD for each table. Will you create your own database tables or will the dba do this? Usually, developers do not have the proper permissions granted to create/drop tables. . .

Here is a link to the db2 info about creating a table (which also explains about data types):
http://publibz.boulder.ibm.com/cgi-bin/ ... sqj10/5.38

From the same manual, here is more info on data types:
http://publibz.boulder.ibm.com/cgi-bin/ ... nsqj10/2.9

The open book near the top-left of the page is the Table of Contents (which you'll want to bookmark).

Re: DB2

PostPosted: Wed Sep 16, 2009 1:40 am
by pgandhi671
Thank you so much

Re: DB2

PostPosted: Wed Sep 16, 2009 1:45 am
by dick scherrer
You're welcome - good luck :)

d