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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 316 views
  • 0 likes
  • 2 in conversation