MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to insert & update

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Thu Sep 02, 2010 12:13 am    Post subject: How to insert & update Reply with quote

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
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Sep 02, 2010 12:19 am    Post subject: Reply with quote

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
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Thu Sep 02, 2010 1:09 am    Post subject: Reply with quote

yes, it is ksds file & location of key is 1,16.
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Sep 02, 2010 6:15 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Sep 02, 2010 10:17 am    Post subject: Reply with quote

puttu,

Please search before posting. Take a look at this topic

http://www.mvsforums.com/helpboards/viewtopic.php?p=9479#9479
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group