View previous topic :: View next topic |
Author |
Message |
ace Beginner
Joined: 24 Feb 2004 Posts: 58 Topics: 23
|
Posted: Tue Feb 24, 2004 3:53 pm Post subject: Mass Update table using a job |
|
|
Hi,
I have an input file which is having the primary key of a table,vaue-1,value2 and value-3.
Is it possible to update the table using a Job rather than writing an update program?
The file may have hundereds of records. Given below the field position and length.
Code: |
Primary Key : 1,10
Value-1 : 11,8
Value-2 : 20,4
Value-3 : 25,1
|
Would appreciate any help on this.
Thank You
-Ace |
|
Back to top |
|
|
vini Intermediate
Joined: 12 Jan 2004 Posts: 240 Topics: 48 Location: Maryland
|
Posted: Tue Feb 24, 2004 6:13 pm Post subject: |
|
|
You can execute the LOAD utility (in JCL) but as far as I know ..it helps as far as Inserting records or for Replacing the whole table.
It Rejects all records where it finds a Key match in the Table.
It however maybe possible to simply Update thru this util and maybe I am just not aware of it. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Mon Mar 01, 2004 2:06 pm Post subject: |
|
|
Ace,
You can generate the sql statements using easytrieve or any other language with a commit after 200 sql statements and run it using DSNTEP2 or DSNTIAUL.
Another option is to unload the table and modify the desired rows using an utility and reload it back fresh. This options is feasible when you are updating atleast 50% of the rows.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|