What do you mean by "table"? Are you talking about data kept in an database such as DB2? Or is the "table" really a VSAM file? Or is it an ISPF table? For something like DB2, the SQL statement to issue would look something like:
UPDATE table SET custno=:Good_Cust_No where custno=:Bad_Custno You simply read the correction file data in a loop, doing the above. At least in the simplistic case. But in reality, I fear that it will be much more complicated because in some table rows, the "bad custno" is actually the proper and valid customer number. I.e. you have both customer 98721 and 97821. But somebody reverses the "87" and "78" portion on occasion. I don't know how you would know this with no other data. And it is likely too late to rearchitect the application to use something like a check digit to help decrease entry errors. And how you do it also depends on what tools you have available. COBOL? PL/I? Assembler? Something like SPFUI? -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets® 9151 Boulevard 26 • N. Richland Hills • TX 76010 (817) 255-3225 phone • [email protected] • www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets® is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. –The Chesapeake Life Insurance Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] > On Behalf Of Ron Thomas > Sent: Tuesday, November 20, 2012 10:57 AM > To: [email protected] > Subject: Data correction in tables > > Hello. > > We have a input file with the below format > > Date Bad Custno Good Cust No > 01/01/2012 989898 12345 > 02/02/2012 12346567 9898790 > 03/04/2012 676767 767689 > > This file is a sequentail file wil get appended on a daly basis , i.e > they will be inputting a bad customer number and a good customer > number. The customer numbers are used in around 20 tables and because > of some typo errors or any other thing the bad customer numbers got > entered in to the tables. > > We need to correct the same on a daily or weekly process. could some > one throws some light on what should be the best process we should > consider here. The customer numbers are primary keys in many of the > tables. > > Thanks in Advance > > Regards > Ron T > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
