I'm not sure how to use proc datasets statement. Here is the error and code attached as a picture.
I just don't know what it wants when it says error 22-322 expecting a name. A simple example or solution would be great thanks.
I'm not sure how to use proc datasets statement. Here is the error and code attached as a picture.
I just don't know what it wants when it says error 22-322 expecting a name. A simple example or solution would be great thanks.
There are several issues with your syntax:
library = work;
.modify passengers;
before the format statement so that proc datasets knows which dataset to modify. Otherwise, it will run without errors, but it won't apply the format.quit;
after the run;
when using proc datasets
, as mentioned in your log output. This is because a proc datasets call can contain multiple run;
groups, so you need to indicate that you've got to the last one.You also have the option to put the format statement somewhere else, which would avoid having to use proc datasets at all:
work.passengers
, orproc print
where you're viewing it, if you don't want to apply the format permanently.