I'd use PROC FedSQL because it supports the LIMIT clause. Like this:
/* Make fake data to work with */
data WORK.EXPOSURE;
infile datalines dsd truncover;
input Patient:$200. DoseDate:MMDDYY10.;
format DoseDate MMDDYY10.;
datalines4;
"Thomas, Katherin",01/05/2024
"Feldmann, Anthony",01/19/2024
"Tennyson, Sam",01/09/2024
"Curry, Kristi",01/10/2024
"Smith, Wanda",01/16/2024
"Hoadley, James",01/04/2024
"Wenzel, Calvin",01/30/2024
"Ryan, Jennifer",01/18/2024
"Reyes, Ricky",01/22/2024
"Attwood, James",01/05/2024
"Kaye, Echo",01/03/2024
"Christia, Anna",01/15/2024
"Cheeks, Linda",01/30/2024
"Yates, Agnes",01/04/2024
"Snider, Regina",01/05/2024
"Robinson, Nichole",01/12/2024
"Ramirez, Kevin",01/20/2024
"Carolan, Kris",01/20/2024
"Jenkins, Thomas",01/21/2024
"Tillman, Micheal",01/28/2024
"Gibbs, Wayne",01/10/2024
"Profit, Ronald",01/15/2024
"Morrell, Suzanna",01/28/2024
"Snelling, Miguel",01/23/2024
"Hutching, Randall",01/16/2024
"Schweitzer, Veronica",01/25/2024
"McDonald, Nathan",01/12/2024
"Kelley, Robert",01/03/2024
"Carroll, John",01/16/2024
"Shipley, Lewis",01/03/2024
;;;;
/* Create the report */
proc FedSQL number;
select Patient, DoseDate
from exposure
order by DoseDate
limit 10
;
quit;
Result:
Row
Patient
DoseDate
1
Shipley, Lewis
01/03/2024
2
Kaye, Echo
01/03/2024
3
Kelley, Robert
01/03/2024
4
Hoadley, James
01/04/2024
5
Yates, Agnes
01/04/2024
6
Thomas, Katherin
01/05/2024
7
Snider, Regina
01/05/2024
8
Attwood, James
01/05/2024
9
Tennyson, Sam
01/09/2024
10
Gibbs, Wayne
01/10/2024
... View more