Hello,
I am a new SAS coder working on a homework problem that has stumped me. The question is: Write SAS code which will read in 10 observations from the ‘SASHelp.Cars’ data set, starting with the 70th observation.
Below is the code I wrote for my answer:
DATA WORK.Illus;
SET SASHelp.Cars (FIRSTOBS = 70 OBS = 10);
RUN;
However, when I run this code, my log gives me an error and two warnings:
Errors (1)
Warnings (2)
Notes (2)
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 DATAWORK.Illus;
70 SETSASHelp.Cars(FIRSTOBS = 70OBS = 10);
ERROR: FIRSTOBS option > OBS option - no data to read from file SASHELP.CARS.
71 RUN;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ILLUS may be incomplete. When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.ILLUS was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 530.93k
OS Memory 21152.00k
Timestamp 10/26/2023 07:03:03 PM
Step Count 42 Switch Count 0
Page Faults 0
Page Reclaims 52
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
72
73 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
83
What am I missing? Thanks for any help.