Editing syntax with Ctrl+H

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

Editing syntax with Ctrl+H

John F Hall

If I highlight a section of syntax and use Ctrl+H to replace x with y, why does it do the whole syntax file and not just the highlit section?  This is quite irritating when trying to save time by copying large chunks of text from questionnaires in which text is available for variable and value labels, but needs trimming.  Some of the modified bits get remodified.  For now I copy text to word and do the modifications there, then copy back to syntax.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

===================== 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: Editing syntax with Ctrl+H

Bruce Weaver
Administrator
I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax.  

HTH.



John F Hall wrote

> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>
>  
>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>
>  
>
> Email:          

> johnfhall@

>  <mailto:

> johnfhall@

> >  
>
> Website:     Journeys in Survey Research
> <http://surveyresearch.weebly.com/>
>
>
> Course:       Survey Analysis Workshop (SPSS)
> <http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html> 
>
> Research:   Subjective Social Indicators (Quality of Life)
> <http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html>
>
>  
>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Editing syntax with Ctrl+H

bdates

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.


Brian

From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H
 
I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote
> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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: Editing syntax with Ctrl+H

John F Hall

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote


> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

===================== 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: Editing syntax with Ctrl+H

Jon Peck
You asked,
" Does ^p (CRLF) work in the SPSS syntax files I wonder?"

If you mean ctrl-p, that is a shortcut for print.  But ^p or ctrl-p does not mean CRLF.

On Wed, Nov 7, 2018 at 11:39 AM John F Hall <[hidden email]> wrote:

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote


> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

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


--
Jon K Peck
[hidden email]

===================== 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: Editing syntax with Ctrl+H

John F Hall

Jon

 

I meant ^p in the Ctrl+H box, which is CRLF.

 

variable labels

*copy lines of text from questionnaire.

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

 

Ctrl+H

 

Find                  ^p

Replace with     "^p

 

______ 1. I don't have much control over my emotional reactions to stressful situations."

______ 2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                  ______ ˽                       [ ˽ = space]

Replace with     ˽pc

           

pc1. I don't have much control over my emotional reactions to stressful situations."

pc2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                 

Replace with     ˽"Scale H: ˽

 

pc1 "Scale H: I don't have much control over my emotional reactions to stressful situations."

pc2 "Scale H: When I'm in a bad mood I find it hard to snap myself out of it."

 

Looks cumbersome, but using Ctrl+H is much quicker than typing out dozens of new lines.

 

Shame an otherwise excellent book is spoilt by such lack of attention to basic detail.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: 07 November 2018 19:47
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

You asked,

" Does ^p (CRLF) work in the SPSS syntax files I wonder?"

 

If you mean ctrl-p, that is a shortcut for print.  But ^p or ctrl-p does not mean CRLF.

 

On Wed, Nov 7, 2018 at 11:39 AM John F Hall <[hidden email]> wrote:

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote


> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

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


 

--

Jon K Peck
[hidden email]

===================== 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: Editing syntax with Ctrl+H

Jon Peck
Why do you think ^p is CRLF?  CRLF (or more generally, end of line since Mac line ends are different)?  \n can be treated as the line break.

On Thu, Nov 8, 2018 at 2:04 AM John F Hall <[hidden email]> wrote:

Jon

 

I meant ^p in the Ctrl+H box, which is CRLF.

 

variable labels

*copy lines of text from questionnaire.

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

 

Ctrl+H

 

Find                  ^p

Replace with     "^p

 

______ 1. I don't have much control over my emotional reactions to stressful situations."

______ 2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                  ______ ˽                       [ ˽ = space]

Replace with     ˽pc

           

pc1. I don't have much control over my emotional reactions to stressful situations."

pc2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                 

Replace with     ˽"Scale H: ˽

 

pc1 "Scale H: I don't have much control over my emotional reactions to stressful situations."

pc2 "Scale H: When I'm in a bad mood I find it hard to snap myself out of it."

 

Looks cumbersome, but using Ctrl+H is much quicker than typing out dozens of new lines.

 

Shame an otherwise excellent book is spoilt by such lack of attention to basic detail.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: 07 November 2018 19:47
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

You asked,

" Does ^p (CRLF) work in the SPSS syntax files I wonder?"

 

If you mean ctrl-p, that is a shortcut for print.  But ^p or ctrl-p does not mean CRLF.

 

On Wed, Nov 7, 2018 at 11:39 AM John F Hall <[hidden email]> wrote:

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote


> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

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


 

--

Jon K Peck
[hidden email]

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


--
Jon K Peck
[hidden email]

===================== 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: Editing syntax with Ctrl+H

hillel vardi
In reply to this post by John F Hall
Shalom

Here is another way to create spss variable labels from a questioner .

1. this is a small questioner in Hebrew as word doc .


0.       לא

1.       כן

האם עישנת נרגילה במחצית השנייה של הריונך?

337

_______ (מספר)

1.        יום

2.       שבוע

אם כן כמה פעמים בממוצע עישנת נרגילה ביום או בשבוע?

 

338

 

האם השתמשת בתכשירים הבאים ללא מרשם רופא במהלך הריונך?

 

0.       לא

1.       כן

קוקאין

339

0.       לא

1.       כן

תרופות נרקוטיות (כגון קודאין, מורפין) שלא נרשמו עבורך

340

0.       לא

1.       כן

הרואין

341

0.       לא

1.       כן

מתאדון

342

0.       לא

1.       כן

תרופות בעלות השפעות מעוררות כמו ספיד (אמפטמינים) שלא נרשמו עבורך

343

0.       לא

1.       כן

שואפת תרופות שלא נרשמו עבורך

344

0.       לא

1.       כן

 תרופות (סמי) הזיה

345

  2 cut the word questioner table and past to excel .
  3 use   CONCATENATE command   to create an spss  command line
   4 this is the commend for the first line

 


answer  question num spss variable labels
0.       לא האם עישנת נרגילה במחצית השנייה של הריונך? 337 variable labels   '337 האם עישנת נרגילה במחצית השנייה של הריונך?' .
1.       כן     variable labels   ' ' .
_______ (מספר) אם כן כמה פעמים בממוצע עישנת נרגילה ביום או בשבוע? 338 variable labels   '338 אם כן כמה פעמים בממוצע עישנת נרגילה ביום או בשבוע?' .
1.        יום     variable labels   ' ' .
2.       שבוע     variable labels   ' ' .
  האם השתמשת בתכשירים הבאים ללא מרשם רופא במהלך הריונך?   variable labels   ' האם השתמשת בתכשירים הבאים ללא מרשם רופא במהלך הריונך?' .
0.       לא קוקאין 339 variable labels   '339 קוקאין' .
1.       כן     variable labels   ' ' .
0.       לא תרופות נרקוטיות (כגון קודאין, מורפין) שלא נרשמו עבורך 340 variable labels   '340 תרופות נרקוטיות (כגון קודאין, מורפין) שלא נרשמו עבורך' .
1.       כן     variable labels   ' ' .
0.       לא הרואין 341 variable labels   '341 הרואין' .
1.       כן     variable labels   ' ' .
0.       לא מתאדון 342 variable labels   '342 מתאדון' .
1.       כן     variable labels   ' ' .
0.       לא תרופות בעלות השפעות מעוררות כמו ספיד (אמפטמינים) שלא נרשמו עבורך 343 variable labels   '343 תרופות בעלות השפעות מעוררות כמו ספיד (אמפטמינים) שלא נרשמו עבורך' .
1.       כן     variable labels   ' ' .
0.       לא שואפת תרופות שלא נרשמו עבורך 344 variable labels   '344 שואפת תרופות שלא נרשמו עבורך' .
1.       כן     variable labels   ' ' .
0.       לא  תרופות (סמי) הזיה 345 variable labels   '345  תרופות (סמי) הזיה' .
1.       כן     variable labels   ' ' .

5  past the spss command to spss syntax window
6 delete unnecessary lines .

variable labels   '337 האם עישנת נרגילה במחצית השנייה של הריונך?' .
variable labels   ' ' .
variable labels   '338 אם כן כמה פעמים בממוצע עישנת נרגילה ביום או בשבוע?' .
variable labels   ' ' .
variable labels   ' ' .
variable labels   ' האם השתמשת בתכשירים הבאים ללא מרשם רופא במהלך הריונך?' .
variable labels   '339 קוקאין' .
variable labels   ' ' .
variable labels   '340 תרופות נרקוטיות (כגון קודאין, מורפין) שלא נרשמו עבורך' .
variable labels   ' ' .
variable labels   '341 הרואין' .
variable labels   ' ' .
variable labels   '342 מתאדון' .
variable labels   ' ' .
variable labels   '343 תרופות בעלות השפעות מעוררות כמו ספיד (אמפטמינים) שלא נרשמו עבורך' .
variable labels   ' ' .
variable labels   '344 שואפת תרופות שלא נרשמו עבורך' .
variable labels   ' ' .
variable labels   '345  תרופות (סמי) הזיה' .
variable labels   ' ' .


Hillel vardi
bgu

On 08/11/2018 11:03, John F Hall wrote:

Jon

 

I meant ^p in the Ctrl+H box, which is CRLF.

 

variable labels

*copy lines of text from questionnaire.

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

 

Ctrl+H

 

Find                  ^p

Replace with     "^p

 

______ 1. I don't have much control over my emotional reactions to stressful situations."

______ 2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                  ______ ˽                       [ ˽ = space]

Replace with     ˽pc

           

pc1. I don't have much control over my emotional reactions to stressful situations."

pc2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                 

Replace with     ˽"Scale H: ˽

 

pc1 "Scale H: I don't have much control over my emotional reactions to stressful situations."

pc2 "Scale H: When I'm in a bad mood I find it hard to snap myself out of it."

 

Looks cumbersome, but using Ctrl+H is much quicker than typing out dozens of new lines.

 

Shame an otherwise excellent book is spoilt by such lack of attention to basic detail.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon Peck
Sent: 07 November 2018 19:47
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

You asked,

" Does ^p (CRLF) work in the SPSS syntax files I wonder?"

 

If you mean ctrl-p, that is a shortcut for print.  But ^p or ctrl-p does not mean CRLF.

 

On Wed, Nov 7, 2018 at 11:39 AM John F Hall <[hidden email]> wrote:

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote
> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

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


 

--

Jon K Peck
[hidden email]

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

===================== 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: Editing syntax with Ctrl+H

Rick Oliver
In reply to this post by Jon Peck
I think it's an MS Office convention. In Word, you can search/replace/insert paragraph markers (CRLF) with "^p" and line feeds (LF) with "^l".

On Thu, Nov 8, 2018 at 9:19 AM Jon Peck <[hidden email]> wrote:
Why do you think ^p is CRLF?  CRLF (or more generally, end of line since Mac line ends are different)?  \n can be treated as the line break.

On Thu, Nov 8, 2018 at 2:04 AM John F Hall <[hidden email]> wrote:

Jon

 

I meant ^p in the Ctrl+H box, which is CRLF.

 

variable labels

*copy lines of text from questionnaire.

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

 

Ctrl+H

 

Find                  ^p

Replace with     "^p

 

______ 1. I don't have much control over my emotional reactions to stressful situations."

______ 2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                  ______ ˽                       [ ˽ = space]

Replace with     ˽pc

           

pc1. I don't have much control over my emotional reactions to stressful situations."

pc2. When I'm in a bad mood I find it hard to snap myself out of it."

 

Ctrl+H

 

Find                 

Replace with     ˽"Scale H: ˽

 

pc1 "Scale H: I don't have much control over my emotional reactions to stressful situations."

pc2 "Scale H: When I'm in a bad mood I find it hard to snap myself out of it."

 

Looks cumbersome, but using Ctrl+H is much quicker than typing out dozens of new lines.

 

Shame an otherwise excellent book is spoilt by such lack of attention to basic detail.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: 07 November 2018 19:47
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

You asked,

" Does ^p (CRLF) work in the SPSS syntax files I wonder?"

 

If you mean ctrl-p, that is a shortcut for print.  But ^p or ctrl-p does not mean CRLF.

 

On Wed, Nov 7, 2018 at 11:39 AM John F Hall <[hidden email]> wrote:

Thanks guys.  I needed it to produce proper syntax files for the 6th edition of Julie Pallant, SPSS Survival Manual.

(https://www.allenandunwin.com/browse/books/academic-professional/research-methods/SPSS-Survival-Manual-Julie-Pallant-9781760291952).  Does ^p (CRLF) work in the SPSS syntax files I wonder?

 

I don't have the actual book, but there's a companion website http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/aboutthebook.html#.W-MfcdVKiiR which claims that the book has been completely revised for SPSS 23 with hyperlinks to data exercises, questionnaires and SPSS files, notes for teachers, notes for students and links to other resources, including to other websites (but not mine).

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/Files/survey.zip contains SPSS file survey.sav with 439 cases and 134 variables, of which only 6 original and 15 derived have variable labels (some uninformative).  All variables are specified as Scale, but most of them are 5- or 7-point Likert items which should be Ordinal.  Only 6 original variables have value labels (all in UPPER CASE) and 3 derived variables have mixed case. 

 

http://spss.allenandunwin.com.s3-website-ap-southeast-2.amazonaws.com/data-files.html#.W-MgldVKiiQ has links to the questionnaire (pdf) and 66 lines of syntax (20 of which are blank) and 13 RECODE or COMPUTE commands, each with EXECUTE, which appear to have been produced by PASTE from the GUI.

 

For anyone wishing to use this book for teaching or learning SPSS, I regard this as sloppy.

 

The questions in the questionnaire are straightforward and easy to copy/edit as variable labels.  The precoded responses are basically sets of items in this format:

 

______ 1. I don't have much control over my emotional reactions to stressful situations.

______ 2. When I'm in a bad mood I find it hard to snap myself out of it.

______ 3. My feelings are usually fairly stable.

______ 4. I can usually talk myself out of feeling bad.

______ 5. No matter what happens to me in my life I am confident of my ability to cope emotionally.

 

. . so I spent a couple of hours generating value labels from them using Ctrl+H.

 

https://surveyresearch.weebly.com/uploads/2/9/9/8/2998485/pallant_2016.sps is what I consider to be a more acceptable syntax file specifying measurement levels, all variable and value labels, and including a couple of data checks not available from the GUI.  Free to anyone who wants it.

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Dates, Brian
Sent: 07 November 2018 17:20
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

The option is "Selected" under Options. It's in the Search Area/Items to Search portion.

 

Brian


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, November 7, 2018 11:07:24 AM
To: [hidden email]
Subject: Re: Editing syntax with Ctrl+H

 

I don't have SPSS on this machine, but is there not a "Show options" button
in the search & replace dialog?  If there is, click it and look for an
option to limit the scope to the highlighted syntax. 

HTH.



John F Hall wrote


> If I highlight a section of syntax and use Ctrl+H to replace x with y, why
> does it do the whole syntax file and not just the highlit section?  This
> is
> quite irritating when trying to save time by copying large chunks of text
> from questionnaires in which text is available for variable and value
> labels, but needs trimming.  Some of the modified bits get remodified.
> For
> now I copy text to word and do the modifications there, then copy back to
> syntax.
>

>
> John F Hall  MA (Cantab) Dip Ed (Dunelm)
>
> [Retired academic survey researcher]
>

>
> Email:         

> johnfhall@

>  &lt;mailto:

> johnfhall@

> &gt; 
>
> Website:     Journeys in Survey Research
> &lt;http://surveyresearch.weebly.com/&gt;
>
>
> Course:       Survey Analysis Workshop (SPSS)
> &lt;http://surveyresearch.weebly.com/1-survey-analysis-workshop-spss.html&gt;
>
> Research:   Subjective Social Indicators (Quality of Life)
> &lt;http://surveyresearch.weebly.com/3-subjective-social-indicators-quality-of-
> life.html&gt;
>

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





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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

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


 

--

Jon K Peck
[hidden email]

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


--
Jon K Peck
[hidden email]

===================== 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: Editing syntax with Ctrl+H

Ki Park
John,
Another way to approach this is to use EXCEL and CONCATENATE function to
create labels for SPSS.
A quick example is below.

<http://spssx-discussion.1045642.n5.nabble.com/file/t340420/New_Bitmap_Image.bmp>



--
Sent from: http://spssx-discussion.1045642.n5.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