[Info-vax] OpenVMS - DCL - Data entry filtering

Dirk Munk munk at home.nl
Fri Mar 27 11:52:15 EDT 2015


Stephen Hoffman wrote:
> On 2015-03-25 10:47:05 +0000, Paul Sture said:
>
>> On 2015-03-25, IanD <iloveopenvms at gmail.com> wrote:
>>>
>>> I am wanting to write a small bit of DCL that will filter a users
>>> input to ensure that the following characters are voided in any input
>>> ...
>> $ ! FILTER.COM
>> ...
>
> FWIW, I'd generally reverse that check, and would allow only a list of
> known-valid characters to pass the filter, as that tends to be more
> resistant to shenanigans.  Anything not on that list gets rejected, so —
> for instance — DEC MCS characters and control characters would be
> filtered out.
>

I agree. I would extract every byte from the input, use F$CVUI to get 
the ASCII value, and then check if the ASCII value is in range of the 
permitted ASCII values.




More information about the Info-vax mailing list