Reputation: 93
I want to restrict the user from entering the special character '|' (pipe) in any name field or data entry fields.
The check should happen from the screen itself and not through RPG/RPGLE program (as described here
I have tried using the VALUES() function in the display file,which only allows those characters mentioned in the function; for ex.
VALUES('A' 'B'...)
and not keeping '|' in it to disallow it, but it becomes very restricted, as one might disallow something which he should not.
Upvotes: 0
Views: 874
Reputation: 7648
I think @david has the right answer - check the data at runtime. The way I would implement this is with a trigger. That way, no matter what tried to insert or update your field with a special character, the database itself would reject the attempt.
Upvotes: 3
Reputation: 4014
I think the easiest method would be to do an edit check at runtime instead of trying to get your workstation to do the edit.
Upvotes: 3