4.3.3 Modifying the Simple Inquiry to Do Maintenance

Modify the previous inquiry function to also maintain records in the file.

Files Involved

Physical file CUSMST (customer master file)

RDML Program


           #NAME #ADDL1 #ADDL2 #ADDL3)


















    MESSAGE    MSGTXT('No customer exists with this number')





Points to Note:

So the possibility arises that another user could update the record in the interval between the FETCH and the UPDATE. This interval could be 30 minutes if the user decided to go to lunch.

If file CUSMST is created and maintained by LANSA this will not be a problem because the UPDATE command automatically checks for a change to the record in the interval between reading it and updating it. If another user has changed the record in the interval ..... the UPDATE command will act exactly as if a validation error had occurred and automatically issue a message indicating that the update was rejected. This will cause the DISPLAY screen to be re-displayed with an error message.