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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 515 views
  • 0 likes
  • 2 in conversation