Hi there - first time posting. Hoping you can help me! I have created a program that prompts for a password. I need to identify if the password contains any double quotes ("), matched or unmatched. Whether that be removing them and comparing a before and after length or finding the location of the " and if the result is >0 then it one exists. The catch is I also need to ensure that any predefined SAS macro variables that could inadvertently end up in the password do not resolve. Here are a couple of things I have tried: Password Entered: Abc"2025&sysdate OPTIONS MPRINT SYMBOLGEN;
*Entered into Prompt;
*_NOLOG_pw = Abc"2024&sysdate;
%PUT _NOLOG_pw = &_NOLOG_PW;
%LET NOLOG = %SUPERQ(_NOLOG_PW);
%PUT NOLOG - &NOLOG.;
%LET NOLOG_NRSTR = %NRSTR(&NOLOG);
%PUT NOLOG_NRSTR = &NOLOG_NRSTR;
%let nolog_find = %sysfunc(find(&NOLOG_NRSTR, %str(%"))); *Resolves to 0;
%put &nolog_find;
data _null_;
TRANWORD = translate(&NOLOG,%str( ),%str(%")); * Results in error;
call symput('NOLOG_TRANWORD',TRANWORD);
RUN;
%PUT NOLOG_TRANWORD = &NOLOG_TRANWORD; Here is the log: Any help you can provide will be greatly appreciated. Thanks!
... View more