How to write the code to remove loans that have payment Center that ends in 30 or 35 in SAS EG and also in SAS VA
This entry enters the competition for shortest question.
One way:
where reverse(catt(CENTER)) not in: ('53','03')
[Edited] colon added. Thanks @Astounding.
This looks promising, but should add a colon:
where reverse(catt(CENTER)) not in : ('53','03')
When the value is numeric you would want
mod(variable,100) in (30 35)
the MOD function returns the remainder when dividing the variable by the second parameter
The very first reply you got works for both numbers and strings.
Have you tried?
Challenge accepted
where prxmatch("m/^.*(35|30)\s*$/",CENTER)=0;
or even
if prxmatch("m/^.*(35|30)\s*$/",CENTER)=0;
- Cheers -
or
if ^prxmatch("/3[50] *$/",CENTER);
considering the new requirements:
^prxmatch("/2[50]$/",catt(CENTER));
- Cheers -
Your variable is numeric. Use the cat function.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.