BookmarkSubscribeRSS Feed
michtka
Fluorite | Level 6

Hi,

anyone can help me to write the next syntax in the command bar of the sas toolbox:

OnceI I open a dataset typing in the command bar

vt work.new

I would like to know what is the right syntax I need to type in the command bar to:

1. keep only the variables: age subjid sex race

2. drop the variables: usubjid dob nationality

3. select an specific observation: for example observation number 36,

4. select a number of observations: for example from 36 to 57.

Thanks in advance.

4 REPLIES 4
art297
Opal | Level 21

I don't think you can do all of that, via commands, with vt.  However, you can with FSView, which can also be called from the command prompt.  Take a look at: http://communities.sas.com/message/102793#102793

michtka
Fluorite | Level 6

Hi, thanks art.

after a quick search, i found this:

1. We can use

columns 'age subjid sex race' .

2. we can use hide 'usubjid dob nationality'

If we want to recovery the variables again we can type unhide in the command var.

3. and 4 is more complicate because I just read that viewtable (VT) dont support first obs= and obs.= statements Smiley Sad

Maybe fsview can support it, I need to search more.

Tom
Super User Tom
Super User

You can use a WHERE statement on VT.

Why would you want to look at particular rows unless those rows correspond to particular values of some variables in dataset?

michtka
Fluorite | Level 6

it just to go to the specific row where I found the uniqual value comparing two datasets that have to be the same Tom.

Just, pointed out straight forward the missmatch of the row 4567 in a dataset of 65000 row, for example.

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 2793 views
  • 0 likes
  • 3 in conversation