How to create notes on SPSS?

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

How to create notes on SPSS?

Ben Lintschinger
Hi All,
 
I was wondering how to add easily accessible notes onto my datasets so that I can remember what I did with them (Aside from having a syntax specific to each dataset).  I read that the DOCUMENT command is involved with this, but I'm not sure exactly how this works, nor how to look up the notes once I input them.  Any advice?
 
Ben
Reply | Threaded
Open this post in threaded view
|

Re: How to create notes on SPSS?

J. R. Carroll
Ben,

  A quick review of the SPSS/PASW syntax guide provided some pretty useful information (I have never used this command before, but I will be in the future - thanks for pointing it out!).

I tested the following:

-------
ADD DOCUMENT "I am testing this out.".
ADD DOCUMENT "This would be trial test #2".
DOCUMENT "Trial test#3".

DISPLAY DOCUMENT.
-------

The first two commands "add" a new comment to the data file (you can achieve the same effect by going to: Utilities -> Data File Comments... please note I am using v17 am not sure how/when it was implemented in older versions of SPSS). 

The third line, "DOCUMENT" apparently does the same thing, however I did notice that the SPSS-Syntax guide recommends that you use the former (i.e. "ADD DOCUMENT"); not sure why, maybe one of the other listers can answer that.  I do notice that "DOCUMENT" does not require the use of quotes around the string, whereas if you use 'ADD DOCUMENT' you have to encapsulate your document note with quotes.  E.g. (sample syntax)

-------
ADD DOCUMENT "See the quotes to either side of this note? Without them, SPSS would return an error".

DOCUMENT Notice now that I do not have quotes - this may be difficult to manage in the midst of other syntax.

DISPLAY DOCUMENT.
-------

The last command I pasted, in both examples ("DISPLAY DOCUMENT") pastes the comments into the output window in sequential order as entered into the data file.  I would recommend that you not put "ADD DOCUMENT" into your syntax for future use as it appears once the document notes are appended to the data file it stays native to the data file itself - if you rerun the script/syntax that contains the 'document notes' it will re-add a new set of document notes to the old set (thus you will have redundant notes); try rerunning the sample scripts above and see how it continues to add the same notes repetitively. 

Hope I made sense and that this was helpful.

J. R. Carroll
Grad. Student in Pre-Doc Psychology at CSUS
Research Assistant for Just About Everyone.
Email:  [hidden email]   -or-   [hidden email]
Phone:  (916) 628-4204


On Fri, Jul 16, 2010 at 2:50 PM, Ben Lintschinger <[hidden email]> wrote:
Hi All,
 
I was wondering how to add easily accessible notes onto my datasets so that I can remember what I did with them (Aside from having a syntax specific to each dataset).  I read that the DOCUMENT command is involved with this, but I'm not sure exactly how this works, nor how to look up the notes once I input them.  Any advice?
 
Ben

Reply | Threaded
Open this post in threaded view
|

Re: How to create notes on SPSS?

Ben Lintschinger
Ah, thanks everyone.  That was pretty simple.  I just downloaded the syntax guide recently and forgot to check it. 

On Fri, Jul 16, 2010 at 3:17 PM, Justin Carroll <[hidden email]> wrote:
Ben,

  A quick review of the SPSS/PASW syntax guide provided some pretty useful information (I have never used this command before, but I will be in the future - thanks for pointing it out!).

I tested the following:

-------
ADD DOCUMENT "I am testing this out.".
ADD DOCUMENT "This would be trial test #2".
DOCUMENT "Trial test#3".

DISPLAY DOCUMENT.
-------

The first two commands "add" a new comment to the data file (you can achieve the same effect by going to: Utilities -> Data File Comments... please note I am using v17 am not sure how/when it was implemented in older versions of SPSS). 

The third line, "DOCUMENT" apparently does the same thing, however I did notice that the SPSS-Syntax guide recommends that you use the former (i.e. "ADD DOCUMENT"); not sure why, maybe one of the other listers can answer that.  I do notice that "DOCUMENT" does not require the use of quotes around the string, whereas if you use 'ADD DOCUMENT' you have to encapsulate your document note with quotes.  E.g. (sample syntax)

-------
ADD DOCUMENT "See the quotes to either side of this note? Without them, SPSS would return an error".

DOCUMENT Notice now that I do not have quotes - this may be difficult to manage in the midst of other syntax.

DISPLAY DOCUMENT.
-------

The last command I pasted, in both examples ("DISPLAY DOCUMENT") pastes the comments into the output window in sequential order as entered into the data file.  I would recommend that you not put "ADD DOCUMENT" into your syntax for future use as it appears once the document notes are appended to the data file it stays native to the data file itself - if you rerun the script/syntax that contains the 'document notes' it will re-add a new set of document notes to the old set (thus you will have redundant notes); try rerunning the sample scripts above and see how it continues to add the same notes repetitively. 

Hope I made sense and that this was helpful.

J. R. Carroll
Grad. Student in Pre-Doc Psychology at CSUS
Research Assistant for Just About Everyone.
Email:  [hidden email]   -or-   [hidden email]
Phone:  (916) 628-4204



On Fri, Jul 16, 2010 at 2:50 PM, Ben Lintschinger <[hidden email]> wrote:
Hi All,
 
I was wondering how to add easily accessible notes onto my datasets so that I can remember what I did with them (Aside from having a syntax specific to each dataset).  I read that the DOCUMENT command is involved with this, but I'm not sure exactly how this works, nor how to look up the notes once I input them.  Any advice?
 
Ben


Reply | Threaded
Open this post in threaded view
|

Re: How to create notes on SPSS?

Rick Oliver-3
Either command will work. If you want the text to include blank lines (e.g., space between paragraphs), use ADD DOCUMENT with null quoted strings for the blank lines. The UI (Utilities>Data File Comments) generates ADD DOCUMENT syntax. The content is saved with the data file. Repeating the command in subsequent session will result in the same comment being duplicated (with a different time stamp) each time the command is run.

It's a very handy way to annotate a dataset.

-----"SPSSX(r) Discussion" [hidden email] wrote: -----

To: [hidden email]
From: Ben Lintschinger [hidden email]
Sent by: "SPSSX(r) Discussion" [hidden email]
Date: 07/16/2010 05:21PM
Subject: Re: How to create notes on SPSS?

Ah, thanks everyone.  That was pretty simple.  I just downloaded the syntax guide recently and forgot to check it. 

On Fri, Jul 16, 2010 at 3:17 PM, Justin Carroll <[hidden email]> wrote:
Ben,

  A quick review of the SPSS/PASW syntax guide provided some pretty useful information (I have never used this command before, but I will be in the future - thanks for pointing it out!).

I tested the following:

-------
ADD DOCUMENT "I am testing this out.".
ADD DOCUMENT "This would be trial test #2".
DOCUMENT "Trial test#3".

DISPLAY DOCUMENT.
-------

The first two commands "add" a new comment to the data file (you can achieve the same effect by going to: Utilities -> Data File Comments... please note I am using v17 am not sure how/when it was implemented in older versions of SPSS). 

The third line, "DOCUMENT" apparently does the same thing, however I did notice that the SPSS-Syntax guide recommends that you use the former (i.e. "ADD DOCUMENT"); not sure why, maybe one of the other listers can answer that.  I do notice that "DOCUMENT" does not require the use of quotes around the string, whereas if you use 'ADD DOCUMENT' you have to encapsulate your document note with quotes.  E.g. (sample syntax)

-------
ADD DOCUMENT "See the quotes to either side of this note? Without them, SPSS would return an error".

DOCUMENT Notice now that I do not have quotes - this may be difficult to manage in the midst of other syntax.

DISPLAY DOCUMENT.
-------

The last command I pasted, in both examples ("DISPLAY DOCUMENT") pastes the comments into the output window in sequential order as entered into the data file.  I would recommend that you not put "ADD DOCUMENT" into your syntax for future use as it appears once the document notes are appended to the data file it stays native to the data file itself - if you rerun the script/syntax that contains the 'document notes' it will re-add a new set of document notes to the old set (thus you will have redundant notes); try rerunning the sample scripts above and see how it continues to add the same notes repetitively. 

Hope I made sense and that this was helpful.

J. R. Carroll
Grad. Student in Pre-Doc Psychology at CSUS
Research Assistant for Just About Everyone.
Email:  [hidden email]   -or-   [hidden email]
Phone:  (916) 628-4204



On Fri, Jul 16, 2010 at 2:50 PM, Ben Lintschinger <[hidden email]> wrote:
Hi All,
 
I was wondering how to add easily accessible notes onto my datasets so that I can remember what I did with them (Aside from having a syntax specific to each dataset).  I read that the DOCUMENT command is involved with this, but I'm not sure exactly how this works, nor how to look up the notes once I input them.  Any advice?
 
Ben



====================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