Recent Activity
Dear all,
I'm experiencing issues while reading an Excel file in input with PROC IMPORT.
Sas converts character variables into numeric ones with al lot of missing values.
I tried different ways to overcome this issue but without success, like: to set to UTF-9 the encoding, to specify the variable that is character (although there are many variables to specify).
proc import out= work.myw replace
dbms=xlsx datafile= "...\myfile.xlsx" ;
run;
DBDSOPTS= "DBTYPE=(varx='CHAR(3)')";
Can anyone help me please?
Thank you in advance
Best
... View more

0
7
Hello Community, I hope you're doing well. I have a dataset with three key variables: patient , time , and drug . My goal is to create a new variable ( group ) that reflects the sequence of drugs that each patient receives based on their prescription time. For instance, here’s a small sample of the data: patient time drug 1 1 A 1 2 B 2 1 B 2 2 A In this example: Patient 1 received drug A at time 1 and drug B at time 2, so their group should be "AB" . Patient 2 received drug B at time 1 and drug A at time 2, so their group should be "BA" . I need to accumulate a sub-string for each patient based on the drug sequence, where the order of the drugs is determined by the time variable. What I’ve Tried So Far: I initially thought of using a BY group processing approach in a DATA step to accumulate the drug names for each patient, but I’m running into some challenges with concatenation and ensuring the drugs are ordered correctly. Solution Requirements: Sort by patient and time: To ensure the drug sequence is accumulated in the correct order. Concatenate drug names: For each patient, accumulate the drug sequence into a new variable called group . Handle each patient separately: The accumulated group should be assigned to each patient, but only once per patient (after all their records are processed). Expected Output: For each patient, the output should be: patient time drug group 1 1 A AB 1 2 B AB 2 1 B BA 2 2 A BA Seeking Guidance: Best Approach: What’s the most efficient way to handle this type of problem? Should I continue with a BY group processing approach, or is there another technique that would work better (such as using PROC SQL or another method)? Challenges with Concatenation: How can I ensure that the drug names are concatenated in the right order for each patient, even if the data might not always come sorted by time ? Optimisation Tips: If there’s a more optimised solution to handle larger datasets, I’d appreciate any pointers! Conclusion: This seems like a common issue where you need to group data by patient and time, but I’m hoping to make the solution as efficient as possible. Any advice or solutions from the community would be greatly appreciated! For further context, I am also exploring to analysing healthcare data, which might help with more advanced drug sequence analysis. If anyone has experience combining with tools, I would love to hear your thoughts! Thank you in advance!
... View more

0
2
We have a SAS 9.4 perpetual license on linux. %put &sysvlong4; shows it is 9.04.01M7. proc product_status shows we have SAS/ACCESS to ODBC. We have also successfull connection established to ODBC database. However the requirement is to establish a connection to Databricks through SAS 9.4 ODBC. I have seen the solutions posted here (https://communities.sas.com/t5/Administration-and-Deployment/SAS-9-4-M7-and-Azure-Delta-Lake/m-p/829359#M24899) and here (https://communities.sas.com/t5/SAS-Enterprise-Guide/step-by-step-approach-to-connect-from-SAS-EG-8-3-to-Azure/td-p/853111). We are aware that for M7 September 2025 is the last month for Standard Technical Support. Unfortunately we do not have SAS AMC or Premium Technical Support. Question : Would SAS Standard Technical Support for M7 until September 2025 cover the installation of Databricks ODBC driver and the mentioned solution in the above link? If Standard Support does not cover this then what can we do from an admin side to make this work?
... View more

0
3
Why choose between SAS and R when you can use both — together, in one environment? SAS Viya Workbench makes it easy to jump between languages without switching tools, copying files, or breaking your train of thought.
With a shared file system and support for notebooks across multiple languages, SAS Viya Workbench lets you mix and match SAS and R in the same project. It's a flexible, modern setup that keeps everything connected and in sync — so you can stay focused on the data, not the logistics.
... View more

0
0
I have a table with three variables: patient, time, drug. Let us say there are two patients. First patient received drug A at time 1 followed by drug B at time 2. Second patient received drug B at time 1 followed by drug A at time 2. I want to accumulate a substring for the group variable, such that patient 1 belongs to group "AB" and patient 2 belong to group "BA". Any suggestions are welcome!
data want;
input patient time drug $ group $;
datalines;
1 1 A AB
1 2 B AB
2 1 B BA
2 2 A BA
;
run;
... View more

1
11
Unanswered topics
These topics from the past 30 days have no replies. Can you help?
Subject | Likes | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |