Load a PS into DB2 table using COBOL



IBM's flagship relational database management system

Load a PS into DB2 table using COBOL

Postby mainframer » Wed Jan 06, 2010 4:43 pm

I have a PS with 4 (virtual)columns like ID, Name, Date of Birth, age and with some records under it. Can u tell me how to load this PS into DB2 table using COBOL?
mainframer
 
Posts: 1
Joined: Wed Jan 06, 2010 4:32 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Load a PS into DB2 table using COBOL

Postby dick scherrer » Fri Jan 08, 2010 12:36 am

Hello and welcome to the forum,

Why do you call the data "virtual columns"? I suspect the PS data is fb with 4 fields (which is most common).

The way to get the data form the file into a table is to read a record from the file, move the data to the db2 host variables, and INSERT the rows.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Load a PS into DB2 table using COBOL

Postby Devu » Sun Jan 10, 2010 12:53 am

Hi,

I guess, dick has mentioned below is how to load the data in to the table using the application program. Apart from that you can also use the db2 utilitiy DSNUTILB. You have to provide the detail information in the sysin such as position and Length in the input file field for perticuler table filed data.

There are few posts available regarding this load utilty in the portal, pls view those posts once.

Thanks
Dev
Devu
 
Posts: 3
Joined: Tue Dec 08, 2009 11:26 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post