IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unable to update duplicate records returned from AIX


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Wed Jan 16, 2008 1:33 am
Reply with quote

We have a code that uses a FLAT FILE as driver file and does a lookup on a VSAM file.The field used for lookup in the vsam file is defined as an AIX with duplicates.
When we move the field to VSAM we get multiple records returned.The requirement is to update all the records but it updates only 1 of them.

Cuurently the code looks like this:
READ FLAT-FILE NEXT RECORD(driver file)-->Build the Alt key from the flat file-->READ VSAM FILE-->10 records are returned-->UPDATE-->results in 1 record updation.

Now I want to do something like this:
READ FLAT FILE-->build Alt key-->START VSAM FILE KEY IS GREATER THAN ALT-KEY-->READ NEXT while the key is same
I assume this will solve my issue.Problem is tht the Alt key is a complete match.Can i stll say Greater than.
Kindly help me with this.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 16, 2008 4:12 am
Reply with quote

Hello,

Once you have done the START/READ for the "first" record, you might use READ NEXT for the others. I believe you want the exact value for the first read, rather than "greater".
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 16, 2008 1:01 pm
Reply with quote

Does the information returned from the AIX not contain the unique key of the actual KSDS record(s) which could be used to retrive from the KSDS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top