Top "Datastep" questions

SAS datastep programming is the basic method of manipulating data in SAS, a 4G Statistical programming language.

how to remove duplicates in SAS data step

How to remove duplicates in SAS data step. data uscpi; input year month cpi; datalines; 1990 6 129.9 1990 7 130.4 1990 8 131.6 1990 9 132.7 1991 4 135.2 1991 5 135.6 1991 6 136.0 1991 7 136.2 ; run; PROC SORT DATA = uscpi …

duplicates sas datastep
SAS variable concatenation through data step

I am looking for a way to create a string variable containing certain values of the dataset while going through …

variables sas sas-macro datastep
Modify a single observation in a SAS data set

Suppose I have the following data set: data people; input name $ age; datalines; Timothy 25 Mark 30 Matt 29 ; run; How can I …

sas datastep
SAS data step/ proc sql insert rows from another table with auto increment primary key

I have 2 datasets as below id name status 1 A a 2 B b 3 C c Another dataset name status new C …

sas proc-sql datastep
Set multiple datasets with similar names in sas

Suppose I have a varying number of datasets in my work environment, but all of which start with a similar …

sas datastep
SAS datastep/SQL select latest record from multiple records with same ID

For example I have a dataset as below: id Date 1 2000/01/01 1 2001/01/01 1 2002/01/01 2 2003/01/01 By datastep or sql, how could I get the record …

sql sas proc-sql datastep
Open code statement recursion detected during exporting a file

I try to export a file in SAS but I get "Open code statement recursion detected." error. Since I export …

recursion sas export sas-macro datastep
How to convert date value from day to Quarter in SAS

I have a data set like this: date 01JAN90 01APR90 01JUL90 01OCT90 01JAN91 01APR91 01JUL91 01OCT91 I want to convert …

date sas datastep
How to sort data using Data step in SAS

I want to sort data in SAS data step. What exactly I mean is: the work of proc sort should …

sas datastep
SAS - Data Step equivalent of Proc SQL

What would be the data step equivalent of this proc sql? proc sql; create table issues2 as( select request, area, …

group-by sas datastep