Vatchy
670 pts. | Sep 8 2009 2:01AM GMT
If you have SQL on your system and you know the record key you can use the SQL “UPDATE” command to change that particular record.
Yorkshireman
3200 pts. | Sep 8 2009 11:15AM GMT
how are they getting the data into the system?
If it is a character screen input to DB2 land, then add some validation.
If they are pasting into files in other file systems in the IFS, then you may need a validatiuon program to check and edit those files.
What sanctions do you have against the user?
such a manual recovery to a production system just cannot be tolerated.
NullFields
395 pts. | Sep 8 2009 2:26PM GMT
I agree with Yorkshireman. You need to stop the bad data from getting into the table. Applying validation to the data entry is the best way. The closer that validation is to the database, the better. You could apply check constraints to the columns or a DB trigger that would catch bad data no matter what mechanism is used to enter the data.
Splat
1050 pts. | Sep 9 2009 3:58PM GMT
It’s been some time since I’ve done this and things may have changed but I think that you can use UPDDTA to remove the record in question. When you receive the The retrieved record contains invalid data message, do another F23 - if memory serves that will lock the record for update & a final F23 should remove it. Or that’s how it worked for me in the past.
If that doesn’t work, see if you can F23 the user.
Koohiisan
995 pts. | Sep 9 2009 5:02PM GMT
I’m with Vatchy, SQL saved us many a time. We used to get invalid data (hex stuff) from scanners every now and then, and we were able to do a simple update. Our barcode field was about 15 chars and was stored in a 20 char field. So, we did an SQL ‘UPDATE file SET field=LEFT(field,15)’. A few minutes later all was well! So, even if you can’t identify the exact record to do an SQL update against it, maybe you can just try to ‘normalize’ that field in the whole file.
Just my $0.02.
TomLiotta
7355 pts. | Oct 11 2009 11:19AM GMT
This isn’t a user issue — it’s an application issue. Users can’t be expected to know that a carriage-return, nor any other special/control character, is going to make it into a database record. The interface shouldn’t allow it to happen.
Fix the interface. And maybe even thank the user for exposing a potentially serious flaw in the design/implementation. If there is no validation, how can any of the data be trusted? Users can simply put whatever they want in?
Usually, the problem isn’t that the record can’t be deleted or updated. It’s that your record can’t be displayed. Okay, then don’t display them when fixing them. Simply issue a SQL DELETE or UPDATE against the rows with bad data.
Stop allowing those characters to get into the records and the problem shouldn’t happen.
Tom






