Questions tagged [sas]

0 votes
2 replies
Dummary Variable numeric difference in SAS
My code was running fine until I added the last line for age 5+. Does anyone know what's wrong with that line? Thank you. data Work.File ; se...
sas
asked 1 month ago
0 votes
1 replies
CALL SYMPUT a character operand was found in the %EVAL function
I am currently attempting to create a macro that is setting parts of a string to a list of global variables where the parts of the string are sep...
asked 1 month ago
1 votes
1 replies
How Can I Stop a SAS Data Step from Opening a Command Prompt
I've successfully executed a call to Python code in my SAS interface, thanks to you lovely folks in the land of Stackoverflow.com. My next questi...
asked 1 month ago
0 votes
0 replies
Regression results returning 0 in SAS Enterprise Guide
I am brand new to SAS . I'm trying to create dummy variables in SAS and run regression. After doing some research, I put the following codes to...
asked 1 month ago
1 votes
3 replies
How Do I Write A Do-Loop That Creates A Graph For Each Unique Person?
I am trying to run through a large data set and create a simple scatter plot for each person. I would like to run this in SAS using a do loop an...
asked 1 month ago
0 votes
1 replies
How would you add spaces in front of every capital letter in a macro string, in SAS?
I have several macro variables like this: %let name=MyCamelisedString; And I'm searching for a formula to automatically add spaces in front of...
asked 1 month ago
0 votes
2 replies
Conditional transpose using SAS
I have a dataset that looks like the following for multiple patients. I am trying to subtract each visit value from the baseline value of corresp...
asked 1 month ago
1 votes
2 replies
How can I force SAS to wait for a command to fully execute?
I've got a bit of an issue with having my SAS sessions kick off, and subsequently wait for Python scripts to complete. I'm using Python for a Bag...
asked 1 month ago
0 votes
1 replies
How to read Server disk space details via sas code
Here I need to read the details of my windows server disk utilization from sas code. Below thing I want to achieve(using SAS code): C:>wmic l...
asked 1 month ago
0 votes
3 replies
Define BASE structure when using PROC APPEND with empty BASE
I am trying to create a single dataset through iterations of a macro loop. I have found that proc append does not need a defined BASE in order to...
sas
asked 1 month ago
1 votes
2 replies
Use getColumnName() or getColumnLabel() for getString()?
I am facing an issue with the SAS jdbc driver I have not seen before, and wondered what would be the correct JDBC behaviour. Suppose I have some...
asked 1 month ago
0 votes
1 replies
Convert text ddmmyyyy to SAS date with format Date9
I have a text column with data in the form of 'dd.mm.yyyy'. I need to convert it to SAS Date with format Date9. mydate(text format) newda...
sas
asked 1 month ago
0 votes
2 replies
Weird character variable dont convert to numeric
I have these txt New_Wireless_Fixed and when I read it using a data step, it reads the value for Sale/Funds but it does not convert it into numer...
asked 1 month ago
0 votes
1 replies
SAS:How to filter out using multiple keywords from a group
I have a data that has activities each person performs during a season - Name Season Activity A 1 x A 1 y A 1 z A 1 t A 2 y...
sas
asked 1 month ago
1 votes
0 replies
Retain Statement, Groupby and IF condition in SAS to Python
To give a gist, I am trying to flag a variable "RUN" which satisfies GROUPBY and IF conditions. Below is the code i am converting SAS code to Pyt...
asked 1 month ago
-1 votes
0 replies
How do i create a SAS loop macro that calculates base price using a dataset by week by item by store?
I'm trying to incorporate my algorithm to calculate a new price depending on a rolling week time period and threshold promotional percentage. I n...
asked 1 month ago
0 votes
0 replies
Hash object limit on number of keys - large recursive lookup [SAS]
I am using a hash object for recursive lookup. Example data id1 id2 A B B C C D Output orig_id id1 id2 A A...
asked 1 month ago
0 votes
0 replies
How to import file sas7bdat into R with where clause
I would like to import a file in .sas7bdat into R. The file is very big, so I need to import only the rows that match given criteria. With a fi...
asked 1 month ago
-1 votes
2 replies
loop whole code many times on SAS program causes error
I have a long code about 5000 lines. When I macro this program, and loop a few times. It executed successfully but if I changed the loop to 300 t...
asked 1 month ago
-1 votes
1 replies
Calculating BMI using SAS logic
I have a dataset that looks like the following for many patients Patient VisitDate Value Unit Type A Jan12019 1 m...
sas
asked 1 month ago
0 votes
1 replies
Concatenating SAS datasets but preserving order of one dataset
I'm looking to add to a macro used as part of a standard process. The macro currently brings together multiple datasets from different product gr...
0 votes
0 replies
Calling R from SAS and memory issues
I am working with a very large dataset (~30 million rows). I have typically work with this dataset in SAS but would like to use some machine lea...
asked 1 month ago
-1 votes
1 replies
Create Week Variable Based on Date Time Variable
Simple question, I think. I have a checkin_date_time variable in a database with thousands of unique records. Database ID che...
sas
asked 1 month ago
0 votes
1 replies
ODS Tagsets RTF
I am trying to make underscores (_) appear in my output while using ODS Tagsets but for some unknown reasons it's not appearing as expected. I'm...
asked 1 month ago
-1 votes
2 replies
How to recode values of a variable based on the maxmium value in the variable, for hundreds of variables?
I want to recode the max value of a variable as 1 and 0 when it is not. For each variable, there may be multiple observations with the max value....
asked 1 month ago