Page 1 of 1

Load a PS into DB2 table using COBOL

PostPosted: Wed Jan 06, 2010 4:43 pm
by mainframer
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?

Re: Load a PS into DB2 table using COBOL

PostPosted: Fri Jan 08, 2010 12:36 am
by dick scherrer
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.

Re: Load a PS into DB2 table using COBOL

PostPosted: Sun Jan 10, 2010 12:53 am
by Devu
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