Rather than asking on this forum to "please check my SAS code and tell me what's wrong?", I decided to ask Anthropic's Claude for help.
Well, way too often what Claude suggested simply did not work. I asked again, and again. Claude kept trying to change the SAS code to get it to successfully execute. But, alas, it turned out to be mostly a waste of time. So, just curious what your take is. Do ANY of the LLMs know SAS fairly well, enough for us to post some code and ask it to show where problems are occurring? Your thoughts greatly appreciated.
Nicholas Kormanik
... View more
I have the following dataset data have;
input dob sample_dt ;
datalines; 19650214 20100429 19800724 20210823 19991208 20090908 ; I want to calculate the age in years based on dob and sample_dt. Looking for the following output dob sample_dt age 19650214 20100429 45 19800724 20210623 40 19991208 20090908 09 I tried the following code but its not working. data want; set have; dob=input(dob, yymmdd8.); sample_dt=input(sample_dt, yymmdd8.); age=yrdif(dob, sample_dt); format dob sample_dt yymmdd8.; run;
... View more
Hello,
I have a question pertaining to how to identify unique recipients (by recipient id) across 5 classes of psychotropic meds for two years (2022 and 2023) of quarterly data.
The set up is as follows:
med1 med2 med3 med4 med5 med1 med2 med3 med4 med5
Q1 2022 Q1 2023
Q2 2022 Q2 2023
Q3 2022 Q3 2023
Q4 2022 Q4 2023
The steps that I follow:
1] vertically combine the quarters into CY 2022 and 2023.
2]starting with med1 as the 'base' med check across each of the 5 med types to
identify only unique recipients. The data requestor only wants to count each
recipient once across the med classes.
3] So the final output would give the following for all recipients of both years
2022 med1 med2 med3 med4 med5
unique # unique # ... and so on ...........
of recipient of recipients
and then the same for 2023. The output would be to spread all unique recipients across the 5 classes of meds for both years.
I originally thought of an sql approach, having seen sql solutions on stack overflow blogs.
Expert solutions would be appreciated.
Thank you.
Walt Lierman
... View more
How to get rid off equal symbol in proc report output header ?
data test; input id name $20.; cards; 101 abc 102 def 103 gth 104 nmj ; run;
proc report data=test headline nowindows ;by id; columns id name; run;
... View more
I have implemented the SASWebserver hotfix https://tshf.sas.com/techsup/download/hotfix/HF2/M1V.html and I started receiving the error "The application is not authorized to use SAS Logon Manager." for SASStudio and SASEnvironment manager.
Tried implementing https://support.sas.com/kb/56/451.html for EVM and still same issue. Any suggestions on this?.
Web/Logs/SASServer1_1/SASLogon9.4.log
2024-06-05 14:17:33,796 [tomcat-http--27] ERROR org.apereo.cas.support.rest.resources.ServiceTicketResource - NullPointerException RegisteredServiceAccessStrategyUtils.java:ensureServiceSsoAccessIsAllowed:107 DefaultCentralAuthenticationService.java:get:110 DefaultCentralAuthenticationService.java:get:102
2024-06-05 14:17:34,014 [tomcat-http--28] WARN org.apereo.cas.authentication.attribute.PrincipalAttributeRepositoryFetcher - No person records were fetched from attribute repositories for [{principal=sasadm, credentialClass=[UsernamePasswordCredential], credentialId=[sasadm@saspw], username=sasadm@saspw}] 2024-06-05 14:17:34,015 [tomcat-http--28] INFO org.apereo.cas.authentication.DefaultAuthenticationManager - Authenticated principal [sasadm@saspw] with attributes [{}] via credentials [[UsernamePasswordCredential(username=sasadm@saspw, source=null, customFields={})]]. 2024-06-05 14:17:34,035 [tomcat-http--29] ERROR org.apereo.cas.services.web.support.RegisteredServiceResponseHeadersEnforcementFilter - Service unauthorized RegisteredServiceAccessStrategyAuditableEnforcer.java:lambda$execute$6:200 Optional.java:orElseGet:369 RegisteredServiceAccessStrategyAuditableEnforcer.java:execute:194
2024-06-05 16:25:01,254 [tomcat-http--43] ERROR org.apereo.cas.services.web.support.RegisteredServiceResponseHeadersEnforcementFilter - Service unauthorized
RegisteredServiceAccessStrategyAuditableEnforcer.java:lambda$execute$6:200
Optional.java:orElseGet:369
RegisteredServiceAccessStrategyAuditableEnforcer.java:execute:194
2024-06-05 16:25:01,254 [tomcat-http--43] ERROR org.apereo.cas.support.rest.resources.ServiceTicketResource - NullPointerException
RegisteredServiceAccessStrategyUtils.java:ensureServiceSsoAccessIsAllowed:107
DefaultCentralAuthenticationService.java:get:110
DefaultCentralAuthenticationService.java:get:102
... View more