what does it mean when 1 is added after data statement? e.g.
data apple 1;
set template 1;
Likely that the file was not actually code to execute and the 1 (or other numbers) are just a reference point.
When I run an example of that code with an existing data:
250 data apple 1; - 22 200 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_. ERROR 200-322: The symbol is not recognized and will be ignored. 251 252 set sashelp.class; 253 run;
The first error means that the first 1 is not in an allowable code position.
That isn't valid code and the 1 shouldn't be there. If you can add more context perhaps we can offer other details but as posted it's invalid code.
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 data class 1;
_
22
200
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
70
71 set sashelp.class 1;
_
22
200
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, CUROBS, END, INDSNAME, KEY,
KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
72 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.CLASS may be incomplete. When this step was stopped there were 0 observations and 5 variables.
WARNING: Data set WORK.CLASS 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 639.46k
OS Memory 26020.00k
Timestamp 02/24/2022 02:12:03 AM
Step Count 30 Switch Count 0
Page Faults 0
Page Reclaims 75
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 16
@HeatherNewton wrote:
what does it mean when 1 is added after data statement? e.g.
data apple 1;
set template 1;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.