Top "Sas" questions

The SAS language is a 4GL that underpins the SAS system, a suite of products centered around data processing and statistical procedures.

How to convert date in SAS to YYYYMMDD number format

In test_1 table, the my_date field is a "DATE9." format. I would like to convert it to a pure …

sas proc-sql
convert datetime to date in proc-sql sas

I'm trying to convert datetime22.3 variable to ddmmmyy10. in proc sql, this is giving me ****** in the output column. How …

sas proc-sql
How to detect how many observations in a dataset (or if it is empty), in SAS?

I wonder if there is a way of detecting whether a data set is empty, i.e. it has no …

sas
get a the row number in a data step using sas

Is there a way to get to do a over partition to get the row number on sas? In sql …

sas
converting format (from date to numeric) using SAS

I am working with a dataset in SAS, containing many variables. One of these variables is a DATE variable and …

sas
Using SAS Macro to pipe a list of filenames from a Windows directory

I am trying to amend the macro below to accept a macro parameter as the 'location' argument for a dir …

sas pipe sas-macro dir file-io
LEFT JOIN in SAS using PROC SQL

I am new to SAS and have this basic problem. I have a list of NYSE trading dates in table …

join sas left-join proc-sql
concat two numbers in sas proc sql

I have a table that has two numeric values called year and month. I would like to create a new …

sas
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
Is it possible to loop over SAS datasets?

I have 60 sas datasets that contain data on consumers individual characteristics such as id, gender, age, amountSpent, .... Each dataset shows …

sas sas-macro