Help using Base SAS procedures

Prompted email addresses containing special characters

Reply
Contributor
Posts: 33

Prompted email addresses containing special characters

I have a srored process which prompts the user for an email address:

to=(&p_email)

This works fine, except when the email address entered contains special characters, namely a hyphen. I this case joebloggs@a-company.com becomes joebloggs@a - company.com when the email is sent, thus failing.

Can anyone suggest a solution or explain why this is happening?

Thanks
PROC Star
Posts: 7,492

Re: Prompted email addresses containing special characters

Difficult to say without seeing/knowing what your process entails, but one easy solution might be to just wrap the macro variable in a compress function.

E.g., to=compress("&p_email.");

HTH,
Art
> I have a srored process which prompts the user for an
> email address:
>
> to=(&p_email)
>
> This works fine, except when the email address
> entered contains special characters, namely a hyphen.
> I this case joebloggs@a-company.com becomes
> joebloggs@a - company.com when the email is sent,
> thus failing.
>
> Can anyone suggest a solution or explain why this is
> happening?
>
> Thanks
Ask a Question
Discussion stats
  • 1 reply
  • 175 views
  • 0 likes
  • 2 in conversation