BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

DO we have to use NOOBS while using ID? 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

I guess you are talking about proc print. I think using a ID statement implies option NOOBS, since the ID variable is supposed to provide observation identification. Compare:

 

proc sort data=sashelp.class out=class; by sex name; run;

proc print data=class; by sex; run;
proc print data=class; by sex; id sex; run;
proc print data=class noobs; by sex; id sex; run;
PG

View solution in original post

3 REPLIES 3
Reeza
Super User

You haven't provided enough info regarding your problem. 

Please explain your question in more detail. 

SamuelRajKandru
Quartz | Level 8
Ummm, I was going through Chapter 4 of the SAS Cert Prep Guide. So inorder to eradicate the OBS column, we use a NOOBS. My question is, do we have to write the NOOBS in the code even when we use an ID statement? Or is it not necessary to mention the NOOBS in the code while using the ID statement?
PGStats
Opal | Level 21

I guess you are talking about proc print. I think using a ID statement implies option NOOBS, since the ID variable is supposed to provide observation identification. Compare:

 

proc sort data=sashelp.class out=class; by sex name; run;

proc print data=class; by sex; run;
proc print data=class; by sex; id sex; run;
proc print data=class noobs; by sex; id sex; run;
PG

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1306 views
  • 0 likes
  • 3 in conversation