Creating new dataset

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating new dataset

Roger Cupido
I run this syntax to create a new a new dataset with variable, value labels and missing values information but it only creates a blank dataset.

Please help.

DATA LIST FILE='C:\Users\data_set.sav'
  V1
  V2
  V3
  V4
  V5
  V6

V1 "Question name".
VALUE LABELS V1
 5500 "Answer Option"
.
V2 "Question name".
VALUE LABELS V2
.
VARIABLE LABEL V3 "Question name".
VALUE LABELS V3
 710 "Answer Option"
.
VARIABLE LABEL V4 "Question name".
VALUE LABELS V4
 710 "Answer Option"
.
VARIABLE LABEL V5 "Question name".
VALUE LABELS V5
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
VARIABLE LABEL V6 "Question name".
VALUE LABELS V6
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
Roger Cupido
Technical Analyst
Reply | Threaded
Open this post in threaded view
|

Re: Creating new dataset

John F Hall
You've listed variable names, but not the data to which they relate.  Where
are your data?  Read my tutorials on
http://surveyresearch.weebly.com/block-1-from-questionnaire-to-spss-saved-fi
le.html


John F Hall

[hidden email]
www.surveyresearch.weebly.com






-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
SPSS_Tech
Sent: 29 September 2011 10:02
To: [hidden email]
Subject: Creating new dataset

I run this syntax to create a new a new dataset with variable, value labels
and missing values information but it only creates a blank dataset.

Please help.

DATA LIST FILE='C:\Users\data_set.sav'
  V1
  V2
  V3
  V4
  V5
  V6

V1 "Question name".
VALUE LABELS V1
 5500 "Answer Option"
.
V2 "Question name".
VALUE LABELS V2
.
VARIABLE LABEL V3 "Question name".
VALUE LABELS V3
 710 "Answer Option"
.
VARIABLE LABEL V4 "Question name".
VALUE LABELS V4
 710 "Answer Option"
.
VARIABLE LABEL V5 "Question name".
VALUE LABELS V5
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
VARIABLE LABEL V6 "Question name".
VALUE LABELS V6
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Creating-new-dataset-tp4852156
p4852156.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Creating new dataset

David Marso
Administrator
In reply to this post by Roger Cupido
What would be your expectations for this code to do?
What are the contents of the ?existing? file 'C:\Users\data_set.sav' .
I assert that if you are running *EXACTLY* what you have shared here then SPSS will have generated some informative error messages in your output.  Perhaps you would be so kind as to share these with the group?
May I be so bold as to humbly suggest you alter your moniker to something other than SPSS_Tech (people might get the wrong idea).  
--
SPSS_Tech wrote
I run this syntax to create a new a new dataset with variable, value labels and missing values information but it only creates a blank dataset.

Please help.

DATA LIST FILE='C:\Users\data_set.sav'
  V1
  V2
  V3
  V4
  V5
  V6

V1 "Question name".
VALUE LABELS V1
 5500 "Answer Option"
.
V2 "Question name".
VALUE LABELS V2
.
VARIABLE LABEL V3 "Question name".
VALUE LABELS V3
 710 "Answer Option"
.
VARIABLE LABEL V4 "Question name".
VALUE LABELS V4
 710 "Answer Option"
.
VARIABLE LABEL V5 "Question name".
VALUE LABELS V5
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
VARIABLE LABEL V6 "Question name".
VALUE LABELS V6
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Creating new dataset [2]

John F Hall
In reply to this post by Roger Cupido
Re my first reply:

Just spotted .sav on your supposed data set.  If you already have
data_set.sav on your computer, you need to enter the data directly into it.
If it is a blank file, you need to enter (or change) variable names,
variable labels and value labels as well.

It's sometimes easier and quicker to add labels with syntax, especially if
you have a lot of variables with the same value labels, but it's quite
straightforward doing it manually in the data editor.

If you use syntax you need to click on:

File > New > Syntax

then write:

VARIABLE LABELS
  V1 "<label>"
 /v2 "<label>" .                (etc etc)
VALUE LABELS
  V1 1 "<label1>" 2  "<label2>" 3 "<label3>"
 /V2 1 "<label1>" 2  "<label2>" 3 "<label3>" .  (etc etc)

Then run SPSS

Have a look at the step by step example on my website ("Block 1: From
questionnaire to SPSS saved file": fully worked from scratch) using a simple
questionnaire to complete, code, enter and analyse.

John F Hall

[hidden email]
www.surveyresearch.weebly.com






-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
SPSS_Tech
Sent: 29 September 2011 10:02
To: [hidden email]
Subject: Creating new dataset

I run this syntax to create a new a new dataset with variable, value labels
and missing values information but it only creates a blank dataset.

Please help.

DATA LIST FILE='C:\Users\data_set.sav'
  V1
  V2
  V3
  V4
  V5
  V6

V1 "Question name".
VALUE LABELS V1
 5500 "Answer Option"
.
V2 "Question name".
VALUE LABELS V2
.
VARIABLE LABEL V3 "Question name".
VALUE LABELS V3
 710 "Answer Option"
.
VARIABLE LABEL V4 "Question name".
VALUE LABELS V4
 710 "Answer Option"
.
VARIABLE LABEL V5 "Question name".
VALUE LABELS V5
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
VARIABLE LABEL V6 "Question name".
VALUE LABELS V6
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Creating-new-dataset-tp4852156
p4852156.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Creating new dataset

John F Hall
In reply to this post by Roger Cupido
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
SPSS_Tech
Sent: 29 September 2011 10:02
To: [hidden email]
Subject: Creating new dataset

I run this syntax to create a new a new dataset with variable, value labels
and missing values information but it only creates a blank dataset.

Please help.

DATA LIST FILE='C:\Users\data_set.sav'
  V1
  V2
  V3
  V4
  V5
  V6

V1 "Question name".
VALUE LABELS V1
 5500 "Answer Option"
.
V2 "Question name".
VALUE LABELS V2
.
VARIABLE LABEL V3 "Question name".
VALUE LABELS V3
 710 "Answer Option"
.
VARIABLE LABEL V4 "Question name".
VALUE LABELS V4
 710 "Answer Option"
.
VARIABLE LABEL V5 "Question name".
VALUE LABELS V5
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.
VARIABLE LABEL V6 "Question name".
VALUE LABELS V6
 1 "Answer Option"
 2 "Answer Option"
 3 "Answer Option"
 4 "Answer Option"
.

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Creating-new-dataset-tp4852156
p4852156.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Creating new dataset

Richard Ristow
In reply to this post by Roger Cupido
At 04:02 AM 9/29/2011, SPSS_Tech wrote:

>I run this syntax to create a new a new dataset with variable, value
>labels and missing values information but it only creates a blank dataset.
>
>DATA LIST FILE='C:\Users\data_set.sav'
>   V1
>   V2
>   V3
>   V4
>   V5
>   V6

"DATA LIST" is for reading external-format files. The '.sav'
extension usually denotes an SPSS-format saved file. If that is the
case, you may want something like

GET FILE='C:\Users\data_set.sav'\
   /KEEP= V1 V2 V3 V4 V5 V6.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD