Hi @ChrisNZ and @FreelanceReinh
I think I know the reason, you are right @ChrisNZ , let me try to explain my idea. I try to run this code and this time it successfully runs after adding an output.
data hhh/view=hhh;
set sashelp.class (keep=Height Sex Name);
run;
proc sort data=hhh tagsort out=jjj;/*I add the out dataset here*/
by Sex;
run;
So, I rethink about what you said. So, the proc sort will not sort on view (hhh) but it will write the sorted value from hhh on an empty dataset jjj. So, it means, it cannot sort on a view but can write down the data calculation or sorting from view to an output. I hope that I understand your explanation correctly.
Hi @ChrisNZ , I am keen on learning further about SAS (not only VIEW) because I am falling in love with it. Thank you for letting me know about the time-consuming of VIEW, it is the first time I notice about that. The more I learn about it, the more I see its beauty. And the more I discuss with all of you here, the more I grow up not only in coding but also in my characteristics.
Regarding views, I keen on learning it because it is a very nice way to deal with a large dataset. And yeah, there is no free lunch, so if it cost a little space then time-consuming makes sense. The same story happening when we do proc sort with and without TAGSORT option.
Warmest regards and have a good week,
Phil.
... View more