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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.