View previous topic :: View next topic |
Author |
Message |
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Thu Sep 02, 2010 12:13 am Post subject: How to insert & update |
|
|
I need a sort card to update and insert record's into VSAM file from PS file.
Kindly file my requirement:
PS file will be having acct number & nbr (ACCT nbr position: 1,16 & nbr position 27,3)
VSAM File will be having acct nbr & other fields(ACCT Nbr position:1,16 & Nbr position 507,3).
We need to check acct nbr from ps file in vsam file. If acct nbr present we need to update Nbr from PS file to VSAM file.
If not present we need to insert that record into VSAM file. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Sep 02, 2010 12:19 am Post subject: |
|
|
what is location of the key in the vsam file?
is this a ksds vsam? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Thu Sep 02, 2010 1:09 am Post subject: |
|
|
yes, it is ksds file & location of key is 1,16. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Sep 02, 2010 6:15 am Post subject: |
|
|
sounds as if the field you intend to UPDATE is the key, in which case I think
(i am a db2er, and too lazy to look-up the vsam info)
you would want to DELETE the old and INSERT the new. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|