Help using Base SAS procedures

SAS command bar/ right syntax

Reply
Super Contributor
Posts: 301

SAS command bar/ right syntax

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.

PROC Star
Posts: 7,467

SAS command bar/ right syntax

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

Super Contributor
Posts: 301

SAS command bar/ right syntax

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.

Super User
Super User
Posts: 7,039

SAS command bar/ right syntax

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?

Super Contributor
Posts: 301

SAS command bar/ right syntax

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.

Ask a Question
Discussion stats
  • 4 replies
  • 433 views
  • 0 likes
  • 3 in conversation