BookmarkSubscribeRSS Feed
TaeYi
Calcite | Level 5

TaeYi_0-1600052416117.png

 

 

 

 

 

TaeYi_0-1600053730483.png

 

 

 

 

TaeYi_1-1600053765303.png

 





PROC IMPORT OUT= employees DATAFILE=
""
DBMS=xlsx REPLACE;
GETNAMES=YES;
RUN;
PROC PRINT DATA= employees;
RUN;


PROC TABULATE DATA= employees;
CLASS position;
TABLE position ALL;
RUN;

DATA employees;
SET employees;
IF endDate =. THEN endDate = TODAY();
RUN;

DATA truckers;
SET employees;
IF JOB ne 'Truck Driver' THEN DELETE;
RUN;

DATA truckers;
SET employees;
yearsOfService=INT(YRDIF(hireDate,endDate));
RUN;

PROC PRINT DATA=truckers;
RUN;

ODS EXCEL
FILE=""

OPTIONS(sheet_interval='table');
PROC FREQ DATA=truckers;
TABLE yearsOfService;
RUN;

ODS EXCEL CLOSE;

 

1 REPLY 1
brzcol
SAS Employee

Hi, would you mind re-posting the three images above your code? We are unable to see them. Also, did your proc import step successfully run to create the table?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 425 views
  • 0 likes
  • 2 in conversation