Update or delete in file without prior input
Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address]. Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.
Toggle navigation midrange. RE: Update or delete without prior input operation. The READE operation retrieves the next sequential record from a full procedural file identified by an F in position 18 of the file description specifications if the key of the record matches the search argument.
If the key of the record does not match the search argument, an EOF condition occurs, and the record is not returned to the program. How can you update it, if it's no longer there? Not to mention that the whole idea of deleting a record you just updated makes no sense.
Why update something you no longer want? I am chaining to the file with no problem and I need to stay within the key which is why I am using the reade , I am checking for a specific refno and if I find it I need to delete it, but the system is complaining that I have not performed an input operation I would have thought the reade performed that, what is the proper way to handle this?
When you try to update it, you'll get the "need an input operation" error because you have to read a different record before updating it. As soon as you do an update or delete, you lose the record lock, and you have to read again before issuing the next update or delete. Not to mention that it makes absolutely no sense to delete a record and then try to update it. OR update a record and then delete it. If you don't want the record, just delete it. No need to do an update. This thread Re: Update or delete without prior input operation , continued Re: Update or delete without prior input operation , Michael Jacobsen Re: Update or delete without prior input operation , Booth Martin Re: Update or delete without prior input operation , Andy Hautamaki Re: Update or delete without prior input operation , Michael Jacobsen Re: Update or delete without prior input operation , Scott Klement RE: Update or delete without prior input operation , Douglas W.
0コメント