Quantcast

SPSS toolbar icons

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SPSS toolbar icons

John F Hall
Is there a repository of SPSS toolbar icons?  I'd like to include one or two of them in my tutorials, so that,  instead of saying click on the blue arrow I can insert a copy of the actual icon.
 
<IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" width=183 height=192 v:shapes="_x0000_i1025">
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Guidelines or advice for data management?

Robert Lundqvist-3
 As a relatively new SPSS user, I have still not found a stable way to organize my files and away to deal with all datasets. What files should be saved and when, and what is the best way to protect the original data and not end up with loads of files? Some people have told me that they never save any variable or value labels, but prefer to keep the basic file unchanged. For each analysis they repeat a syntax sequence to create those lables. Would this be considered as a good approach? Furthermore, if it was my decision, I could probably find a way that suits my personal needs. However, I am in the position where less experienced users come to me for advice in statistical matters, and what should I tell them? What would be a good "data handling praxis" for someone who don't want to use syntax?

There are obviously no correct answer. We are all different, and the needs also differs a lot depending on the actual kind of data. I would still appreciate either suggestions or pointers to links or literature.

Robert
*****************
Robert Lundqvist
Norrbotten regional council
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Guidelines or advice for data management?

Albert-Jan Roskam
Hi,
 
There's much to say about this, but I'll mention only a couple of things. (1) I *always* make my source file read-only. That way it's guaranteed that the original data are never changed. (2) I *always* use syntax. You mention that you don't, but I'd seriously reconsider that. At the very least, set up the output screen such that it also automatically pastes a copy of the syntax. (3) I use as few intermediate files as possible. DATASET NAME, etc. are perfect for intermediate results. I only write intermediate results to disk if the computations are very time consuming.(4) I *always* use header info on top of the syntax file , with purpose, author, date and project information.
 
Cheers!!
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



From: Robert Lundqvist <[hidden email]>
To: [hidden email]
Sent: Tue, November 30, 2010 9:09:24 AM
Subject: [SPSSX-L] Guidelines or advice for data management?

As a relatively new SPSS user, I have still not found a stable way to organize my files and away to deal with all datasets. What files should be saved and when, and what is the best way to protect the original data and not end up with loads of files? Some people have told me that they never save any variable or value labels, but prefer to keep the basic file unchanged. For each analysis they repeat a syntax sequence to create those lables. Would this be considered as a good approach? Furthermore, if it was my decision, I could probably find a way that suits my personal needs. However, I am in the position where less experienced users come to me for advice in statistical matters, and what should I tell them? What would be a good "data handling praxis" for someone who don't want to use syntax?

There are obviously no correct answer. We are all different, and the needs also differs a lot depending on the actual kind of data. I would still appreciate either suggestions or pointers to links or literature.

Robert
*****************
Robert Lundqvist
Norrbotten regional council
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Guidelines or advice for data management?

John F Hall
In reply to this post by Robert Lundqvist-3
Robert
 
Have a look at the entry-level, syntax-based SPSS tutorials on my website, especially 1.3.3.9  Some general advice on file building in SPSS. 
 
The tutorials are specific to the management and analysis of data from questionnaire surveys and are intended for newbies, students, researchers, tutors and support staff.  Most of them use SPSS 18, but some are still in 15.  All syntax examples will work with releases back to 11, but the GUI menu examples are all from 18.  There are around 400 pages altogether and everything is available for free download.
 
There nothing specific about which files to save and how, but you'll pick up a lot of good practice by reading through the tutorials right from the very beginning and noting the steps taken to create and save syntax and saved files (and the occasional hint on professional practice).  There's nothing about how to organise folders, but this is implicit in the steps to create folders and sub-folders as the tutorials progress step-by-step (with full-colour screenshots at each step) through the entire research process from data capture to statistical analysis.
 
 
----- Original Message -----
Sent: Tuesday, November 30, 2010 9:09 AM
Subject: Guidelines or advice for data management?

As a relatively new SPSS user, I have still not found a stable way to organize my files and away to deal with all datasets. What files should be saved and when, and what is the best way to protect the original data and not end up with loads of files? Some people have told me that they never save any variable or value labels, but prefer to keep the basic file unchanged. For each analysis they repeat a syntax sequence to create those lables. Would this be considered as a good approach? Furthermore, if it was my decision, I could probably find a way that suits my personal needs. However, I am in the position where less experienced users come to me for advice in statistical matters, and what should I tell them? What would be a good "data handling praxis" for someone who don't want to use syntax?

There are obviously no correct answer. We are all different, and the needs also differs a lot depending on the actual kind of data. I would still appreciate either suggestions or pointers to links or literature.

Robert
*****************
Robert Lundqvist
Norrbotten regional council
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Guidelines or advice for data management?

John F Hall
Steve
 
My mistake: that link was to the Weebly author only access.  The corrected SPSS tutorials link should now be to: http://surveyresearch.weebly.com/guide-to-spss-tutorials.html
 
----- Original Message -----
Sent: Tuesday, November 30, 2010 3:10 PM
Subject: RE: Guidelines or advice for data management?

Hi John,

                Is that the correct link below to your SPSS tutorials?

 

--Steve

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Tuesday, November 30, 2010 4:06 AM
To: [hidden email]
Subject: Re: Guidelines or advice for data management?

 

Robert

 

Have a look at the entry-level, syntax-based SPSS tutorials on my website, especially 1.3.3.9  Some general advice on file building in SPSS. 

 

The tutorials are specific to the management and analysis of data from questionnaire surveys and are intended for newbies, students, researchers, tutors and support staff.  Most of them use SPSS 18, but some are still in 15.  All syntax examples will work with releases back to 11, but the GUI menu examples are all from 18.  There are around 400 pages altogether and everything is available for free download.

 

There nothing specific about which files to save and how, but you'll pick up a lot of good practice by reading through the tutorials right from the very beginning and noting the steps taken to create and save syntax and saved files (and the occasional hint on professional practice).  There's nothing about how to organise folders, but this is implicit in the steps to create folders and sub-folders as the tutorials progress step-by-step (with full-colour screenshots at each step) through the entire research process from data capture to statistical analysis.

 

 

----- Original Message -----

Sent: Tuesday, November 30, 2010 9:09 AM

Subject: Guidelines or advice for data management?

 

As a relatively new SPSS user, I have still not found a stable way to organize my files and away to deal with all datasets. What files should be saved and when, and what is the best way to protect the original data and not end up with loads of files? Some people have told me that they never save any variable or value labels, but prefer to keep the basic file unchanged. For each analysis they repeat a syntax sequence to create those lables. Would this be considered as a good approach? Furthermore, if it was my decision, I could probably find a way that suits my personal needs. However, I am in the position where less experienced users come to me for advice in statistical matters, and what should I tell them? What would be a good "data handling praxis" for someone who don't want to use syntax?

There are obviously no correct answer. We are all different, and the needs also differs a lot depending on the actual kind of data. I would still appreciate either suggestions or pointers to links or literature.

Robert
*****************
Robert Lundqvist
Norrbotten regional council
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Guidelines or advice for data management?

David Marso
Administrator
In reply to this post by Robert Lundqvist-3
"What would be a good "data handling praxis" for someone who don't want to use syntax?"
This is an Oxymoron!  There is NO such thing because you will be forever doomed to NEVER being able to reliably replicate squat!  Words to the wise or (would be credible): Learn your syntax.
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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

Bruce Weaver
Administrator
In reply to this post by John F Hall
I've not seen any response to this, John.  I would guess that the images are hidden away in a sub-folder below your main SPSS folder.  I just took a quick look, but couldn't find them.  As an alternative, why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do a bit of editing?  This would allow you to show the icon in context, which would likely be more helpful than showing it in isolation.  HTH.

Cheers,
Bruce


John F Hall wrote
Is there a repository of SPSS toolbar icons?  I'd like to include one or two of them in my tutorials, so that,  instead of saying click on the blue arrow I can insert a copy of the actual icon.



John Hall
johnfhall@orange.fr
http://surveyresearch.weebly.com 
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

Art Kendall
if you are on Windows 7  there is a built in Snipping tool.   I do not
recall for sure but think it was there in Vista.

Art Kendall

On 12/1/2010 8:44 AM, Bruce Weaver wrote:

> I've not seen any response to this, John.  I would guess that the images are
> hidden away in a sub-folder below your main SPSS folder.  I just took a
> quick look, but couldn't find them.  As an alternative, why not do a screen
> capture (ALT-Prt Scr), paste it into Paint, and do a bit of editing?  This
> would allow you to show the icon in context, which would likely be more
> helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>> Is there a repository of SPSS toolbar icons?  I'd like to include one or
>> two of them in my tutorials, so that,  instead of saying click on the blue
>> arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
> -----
> --
> 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.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3287657.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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

David Marso
Administrator
In reply to this post by Bruce Weaver
Hi,
They used to be stored in a large image strip in the main SPSS folder rather than as individual icons.  They probably still are, I don't have a current version so that is just a guess that they haven't COMPLETELY changed everything about the front end APIs.  Look under the spss directory for bitmap files and check em out.  You'll need to locate and chop out the appropriate piece of the strip. (under SPSS 11.5 the files are called spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel resources) .  I am assuming you have some sort of image editor (if not I can highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David

Bruce Weaver wrote
I've not seen any response to this, John.  I would guess that the images are hidden away in a sub-folder below your main SPSS folder.  I just took a quick look, but couldn't find them.  As an alternative, why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do a bit of editing?  This would allow you to show the icon in context, which would likely be more helpful than showing it in isolation.  HTH.

Cheers,
Bruce


John F Hall wrote
Is there a repository of SPSS toolbar icons?  I'd like to include one or two of them in my tutorials, so that,  instead of saying click on the blue arrow I can insert a copy of the actual icon.



John Hall
johnfhall@orange.fr
http://surveyresearch.weebly.com 
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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

John F Hall
In reply to this post by Art Kendall
Art, Bruce,
 
Thanks for the suggestions.  I'm still on Windows XP.
 
I was hoping to avoid the workaround , but I can do [alt]prtscr and then try and boost the image pixels.  That's what I did with the SPSS startup shortcut icon, scanning to pdf at high resolution, copying to word and selecting a chunk with the left key held down.  It's a bit blurred, but at least it worked.
 
----- Original Message -----
Sent: Wednesday, December 01, 2010 3:02 PM
Subject: Re: SPSS toolbar icons

if you are on Windows 7  there is a built in Snipping tool.   I do not
recall for sure but think it was there in Vista.

Art Kendall

On 12/1/2010 8:44 AM, Bruce Weaver wrote:

> I've not seen any response to this, John.  I would guess that the images are
> hidden away in a sub-folder below your main SPSS folder.  I just took a
> quick look, but couldn't find them.  As an alternative, why not do a screen
> capture (ALT-Prt Scr), paste it into Paint, and do a bit of editing?  This
> would allow you to show the icon in context, which would likely be more
> helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>> Is there a repository of SPSS toolbar icons?  I'd like to include one or
>> two of them in my tutorials, so that,  instead of saying click on the blue
>> arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
> -----
> --
> 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.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3287657.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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

ViAnn Beadle
In reply to this post by David Marso
The front-end has completely changed with the transition from Microsoft COM
to Java. The images are most likely stored in some deeply nested .jar file.
Screen grabbing is a lot easier, especially if the app knows about screen
objects. I used SnagIt for years to do this kind of stuff.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
David Marso
Sent: Wednesday, December 01, 2010 9:17 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

Hi,
They used to be stored in a large image strip in the main SPSS folder rather
than as individual icons.  They probably still are, I don't have a current
version so that is just a guess that they haven't COMPLETELY changed
everything about the front end APIs.  Look under the spss directory for
bitmap files and check em out.  You'll need to locate and chop out the
appropriate piece of the strip. (under SPSS 11.5 the files are called
spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel
resources) .  I am assuming you have some sort of image editor (if not I can
highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I
would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David


Bruce Weaver wrote:

>
> I've not seen any response to this, John.  I would guess that the
> images are hidden away in a sub-folder below your main SPSS folder.  I
> just took a quick look, but couldn't find them.  As an alternative,
> why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do
> a bit of editing?  This would allow you to show the icon in context,
> which would likely be more helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>>
>> Is there a repository of SPSS toolbar icons?  I'd like to include one
>> or two of them in my tutorials, so that,  instead of saying click on
>> the blue arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
>

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3
287916.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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

Antoon Smulders
Hello John,
Maybe Icon viewer (a freeware program) can  be helpful. Icons can be hidden in DLL-files or exe-files.
You can download it here: http://www.cosmin.com/iconviewer/

Good luck
Antoon Smulders

-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens ViAnn Beadle
Verzonden: woensdag 1 december 2010 20:08
Aan: [hidden email]
Onderwerp: Re: SPSS toolbar icons

The front-end has completely changed with the transition from Microsoft COM
to Java. The images are most likely stored in some deeply nested .jar file.
Screen grabbing is a lot easier, especially if the app knows about screen
objects. I used SnagIt for years to do this kind of stuff.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
David Marso
Sent: Wednesday, December 01, 2010 9:17 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

Hi,
They used to be stored in a large image strip in the main SPSS folder rather
than as individual icons.  They probably still are, I don't have a current
version so that is just a guess that they haven't COMPLETELY changed
everything about the front end APIs.  Look under the spss directory for
bitmap files and check em out.  You'll need to locate and chop out the
appropriate piece of the strip. (under SPSS 11.5 the files are called
spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel
resources) .  I am assuming you have some sort of image editor (if not I can
highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I
would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David


Bruce Weaver wrote:

>
> I've not seen any response to this, John.  I would guess that the
> images are hidden away in a sub-folder below your main SPSS folder.  I
> just took a quick look, but couldn't find them.  As an alternative,
> why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do
> a bit of editing?  This would allow you to show the icon in context,
> which would likely be more helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>>
>> Is there a repository of SPSS toolbar icons?  I'd like to include one
>> or two of them in my tutorials, so that,  instead of saying click on
>> the blue arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
>

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3
287916.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

=====================
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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

John F Hall
Anton
 
Thanks.  Tried this, but it can only find 2 icons in SPSS 15 and 14 in PASW 18 (all in the main folder, none in sub-folders.)
 
<IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" width=273 height=174 v:shapes="_x0000_i1025">    <IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image004.jpg" width=253 height=222 v:shapes="_x0000_i1026">
SPSS 15                                                        Pasw 18
 
There don't seem to any others in the SPSS directories.  Looks like it's back to screenshots and workarounds.
 

 

 

 

 ----- Original Message -----

Sent: Thursday, December 02, 2010 1:11 PM
Subject: Re: SPSS toolbar icons

Hello John,
Maybe Icon viewer (a freeware program) can  be helpful. Icons can be hidden in DLL-files or exe-files.
You can download it here: http://www.cosmin.com/iconviewer/

Good luck
Antoon Smulders

-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens ViAnn Beadle
Verzonden: woensdag 1 december 2010 20:08
Aan: [hidden email]
Onderwerp: Re: SPSS toolbar icons

The front-end has completely changed with the transition from Microsoft COM
to Java. The images are most likely stored in some deeply nested .jar file.
Screen grabbing is a lot easier, especially if the app knows about screen
objects. I used SnagIt for years to do this kind of stuff.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
David Marso
Sent: Wednesday, December 01, 2010 9:17 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

Hi,
They used to be stored in a large image strip in the main SPSS folder rather
than as individual icons.  They probably still are, I don't have a current
version so that is just a guess that they haven't COMPLETELY changed
everything about the front end APIs.  Look under the spss directory for
bitmap files and check em out.  You'll need to locate and chop out the
appropriate piece of the strip. (under SPSS 11.5 the files are called
spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel
resources) .  I am assuming you have some sort of image editor (if not I can
highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I
would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David


Bruce Weaver wrote:

>
> I've not seen any response to this, John.  I would guess that the
> images are hidden away in a sub-folder below your main SPSS folder.  I
> just took a quick look, but couldn't find them.  As an alternative,
> why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do
> a bit of editing?  This would allow you to show the icon in context,
> which would likely be more helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>>
>> Is there a repository of SPSS toolbar icons?  I'd like to include one
>> or two of them in my tutorials, so that,  instead of saying click on
>> the blue arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
>

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3
287916.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

=====================
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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

ViAnn Beadle

Toolbar buttons are not icons. Toolbar buttons are images—usually GIFs.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Thursday, December 02, 2010 7:59 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

 

Anton

 

Thanks.  Tried this, but it can only find 2 icons in SPSS 15 and 14 in PASW 18 (all in the main folder, none in sub-folders.)

 

<img width=273 height=174 id="_x0000_i1025" src="file:///C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg">    <img width=253 height=222 id="_x0000_i1026" src="file:///C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image004.jpg">

SPSS 15                                                        Pasw 18

 

There don't seem to any others in the SPSS directories. Looks like it's back to screenshots and workarounds.

 

 

 

 

----- Original Message -----

Sent: Thursday, December 02, 2010 1:11 PM

Subject: Re: SPSS toolbar icons

 

Hello John,
Maybe Icon viewer (a freeware program) can  be helpful. Icons can be hidden in DLL-files or exe-files.
You can download it here: http://www.cosmin.com/iconviewer/

Good luck
Antoon Smulders

-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens ViAnn Beadle
Verzonden: woensdag 1 december 2010 20:08
Aan: [hidden email]
Onderwerp: Re: SPSS toolbar icons

The front-end has completely changed with the transition from Microsoft COM
to Java. The images are most likely stored in some deeply nested .jar file.
Screen grabbing is a lot easier, especially if the app knows about screen
objects. I used SnagIt for years to do this kind of stuff.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
David Marso
Sent: Wednesday, December 01, 2010 9:17 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

Hi,
They used to be stored in a large image strip in the main SPSS folder rather
than as individual icons.  They probably still are, I don't have a current
version so that is just a guess that they haven't COMPLETELY changed
everything about the front end APIs.  Look under the spss directory for
bitmap files and check em out.  You'll need to locate and chop out the
appropriate piece of the strip. (under SPSS 11.5 the files are called
spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel
resources) .  I am assuming you have some sort of image editor (if not I can
highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I
would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David


Bruce Weaver wrote:


>
> I've not seen any response to this, John.  I would guess that the
> images are hidden away in a sub-folder below your main SPSS folder.  I
> just took a quick look, but couldn't find them.  As an alternative,
> why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do
> a bit of editing?  This would allow you to show the icon in context,
> which would likely be more helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>>
>> Is there a repository of SPSS toolbar icons?  I'd like to include one
>> or two of them in my tutorials, so that,  instead of saying click on
>> the blue arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
>

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3
287916.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

=====================
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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

John F Hall
In reply to this post by John F Hall

Muir

 

Bit finickey to work out how to capture, but Bingo!


Highlight both variables . .       and click on the <IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" width=24 height=23 v:shapes="_x0000_i1025">                to drag them across:


 

Now to try some more

----- Original Message -----
Sent: Thursday, December 02, 2010 1:25 PM
Subject: RE: SPSS toolbar icons

HI John,
I use a freeware programme - MW Snap
 
 
this allows you to 'snap' any self defined rectangular area you want rather than a full screen shot and allows you to save it in various image formats
I have used it for teaching and you can take a 'snap' of each step in a process
 
Muir
 
Dr Muir Houston
Social Justice, Place and Lifelong Education Research
School of Education
College of Social Sciences
University of Glasgow
0141-330-4699
 
R3L+ Project - Adult education in the light of the European Quality
Strategy
http://www.learning-regions.net/

GINCO Project - Grundtvig International Network of Course Organisers
http://www.ginconet.eu/



From: John F Hall
Sent: Wed 01/12/2010 18:22
To: [hidden email]
Subject: Re: SPSS toolbar icons

Art, Bruce,
 
Thanks for the suggestions.  I'm still on Windows XP.
 
I was hoping to avoid the workaround , but I can do [alt]prtscr and then try and boost the image pixels.  That's what I did with the SPSS startup shortcut icon, scanning to pdf at high resolution, copying to word and selecting a chunk with the left key held down.  It's a bit blurred, but at least it worked.
 
----- Original Message -----
Sent: Wednesday, December 01, 2010 3:02 PM
Subject: Re: SPSS toolbar icons

if you are on Windows 7  there is a built in Snipping tool.   I do not
recall for sure but think it was there in Vista.

Art Kendall

On 12/1/2010 8:44 AM, Bruce Weaver wrote:

> I've not seen any response to this, John.  I would guess that the images are
> hidden away in a sub-folder below your main SPSS folder.  I just took a
> quick look, but couldn't find them.  As an alternative, why not do a screen
> capture (ALT-Prt Scr), paste it into Paint, and do a bit of editing?  This
> would allow you to show the icon in context, which would likely be more
> helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>> Is there a repository of SPSS toolbar icons?  I'd like to include one or
>> two of them in my tutorials, so that,  instead of saying click on the blue
>> arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com/
>>
>>
>
> -----
> --
> 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.
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3287657.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
|  
Report Content as Inappropriate

Re: SPSS toolbar icons

John F Hall
In reply to this post by ViAnn Beadle

ViAnn

 

Just did these with MWsnap recommended by Muir Houston, using "Capture any area".  Problem solved, but now I need to go through the tutorials and substitute them as appropriate.

 

    <IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image005.jpg" width=23 height=20 v:shapes="_x0000_i1029">      <IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image006.jpg" width=19 height=18 v:shapes="_x0000_i1028">       <IMG src="file://C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image007.jpg" width=21 height=21 v:shapes="_x0000_i1027">   

 

John Hall
[hidden email]
http://surveyresearch.weebly.com

----- Original Message -----
Sent: Thursday, December 02, 2010 4:17 PM
Subject: Re: SPSS toolbar icons

Toolbar buttons are not icons. Toolbar buttons are images—usually GIFs.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Thursday, December 02, 2010 7:59 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

 

Anton

 

Thanks.  Tried this, but it can only find 2 icons in SPSS 15 and 14 in PASW 18 (all in the main folder, none in sub-folders.)

 

<IMG id=_x0000_i1025 src="file:///C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image002.jpg" width=273 height=174>    <IMG id=_x0000_i1026 src="file:///C:\DOCUME~1\Owner\LOCALS~1\Temp\msohtml1\01\clip_image004.jpg" width=253 height=222>

SPSS 15                                                        Pasw 18

 

There don't seem to any others in the SPSS directories. Looks like it's back to screenshots and workarounds.

 

 

 

 

----- Original Message -----

Sent: Thursday, December 02, 2010 1:11 PM

Subject: Re: SPSS toolbar icons

 

Hello John,
Maybe Icon viewer (a freeware program) can  be helpful. Icons can be hidden in DLL-files or exe-files.
You can download it here: http://www.cosmin.com/iconviewer/

Good luck
Antoon Smulders

-----Oorspronkelijk bericht-----
Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens ViAnn Beadle
Verzonden: woensdag 1 december 2010 20:08
Aan: [hidden email]
Onderwerp: Re: SPSS toolbar icons

The front-end has completely changed with the transition from Microsoft COM
to Java. The images are most likely stored in some deeply nested .jar file.
Screen grabbing is a lot easier, especially if the app knows about screen
objects. I used SnagIt for years to do this kind of stuff.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
David Marso
Sent: Wednesday, December 01, 2010 9:17 AM
To: [hidden email]
Subject: Re: SPSS toolbar icons

Hi,
They used to be stored in a large image strip in the main SPSS folder rather
than as individual icons.  They probably still are, I don't have a current
version so that is just a guess that they haven't COMPLETELY changed
everything about the front end APIs.  Look under the spss directory for
bitmap files and check em out.  You'll need to locate and chop out the
appropriate piece of the strip. (under SPSS 11.5 the files are called
spssb32.bmp and spssb16.bmp respectively for 32 pixel and 16 pixel
resources) .  I am assuming you have some sort of image editor (if not I can
highly recommend ImageJ http://rsbweb.nih.gov/ij/download.html ).  OTOH, I
would probably go for a screen shot as Bruce suggests to maintain context.
Hope this helps, David


Bruce Weaver wrote:


>
> I've not seen any response to this, John.  I would guess that the
> images are hidden away in a sub-folder below your main SPSS folder.  I
> just took a quick look, but couldn't find them.  As an alternative,
> why not do a screen capture (ALT-Prt Scr), paste it into Paint, and do
> a bit of editing?  This would allow you to show the icon in context,
> which would likely be more helpful than showing it in isolation.  HTH.
>
> Cheers,
> Bruce
>
>
>
> John F Hall wrote:
>>
>> Is there a repository of SPSS toolbar icons?  I'd like to include one
>> or two of them in my tutorials, so that,  instead of saying click on
>> the blue arrow I can insert a copy of the actual icon.
>>
>>
>>
>> John Hall
>> [hidden email]
>> http://surveyresearch.weebly.com
>>
>>
>
>

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/SPSS-toolbar-icons-tp3285685p3
287916.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

=====================
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
|  
Report Content as Inappropriate

Lost in loops and vectors...

Robert Lundqvist-3
In reply to this post by Albert-Jan Roskam
I have not been able to solve a problem which should be fairly straightforward, but I seem to be lost in loops. Any suggestions how to solve this would be most appreciated. The story goes like this:

*The dataset consists of (among others) a set of variables (right now 39) containing either strings beginning with the letter P ("P20100101...", of length 17), shorter strings beginning with one of a limited set of letters ("A123", "B234",..., of length 4 or 5), dates ("2010020300000000" of length 16) or strings beginning with a number followed by two dates ("12010020420100305", length 17).

*The variables can contain any of these or be missing, so for one case there might only be values in the first variable and missing in the rest, whereas for another case, there might be a series of P20100101...-strings in each of the variables.

*Only the latter, strings with a number and two dates are interesting. From these I want to extract the first number. Or if possible, also the two dates, each in their own variables.

My attempts so far has comprised something like

string pv (a1).
do repeat temp=v1 to v40.
do if  (CHAR.SUBSTR(temp,1,1)='A' | CHAR.SUBSTR(temp,1,1)='B' | (CHAR.SUBSTR(temp,1,4)='2010').
compute pv=' '.
else.
compute pv=char.substr(temp,1,1).
end if.
end repeat.
execute.

The problem is that this overwrites anything found in the first variables v1 to v39, it only reads the last variable v40. There should be a loop over the variable set which stops if and when the search for a string beginning with a number which is not part of a date.

I guess there will be some vector and looping involved, but I am stuck. Any suggestions?

Robert
***************************
Robert Lundqvist
Norrbotten regional council
Lulea
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Lost in loops and vectors...

Richard Ristow
At 11:24 AM 12/28/2010, Robert Lundqvist wrote:

>*The dataset includes a set of variables containing either strings
>beginning with the letter P, strings beginning with one of a limited
>set of letters ("A123", "B234",..., of length 4 or 5), dates
>("2010020300000000" of length 16) or strings beginning with a number
>followed by two dates ("12010020420100305", length 17).
>
>*Only the latter, strings with a number and two dates are
>interesting. From these I want to extract the first number. Or if
>possible, also the two dates, each in their own variables.
>
>My attempts so far has comprised something like
>
>string pv (a1).
>do repeat temp=v1 to v40.
>.  do if   (CHAR.SUBSTR(temp,1,1)='A'
>          |  CHAR.SUBSTR(temp,1,1)='B'
>          | (CHAR.SUBSTR(temp,1,4)='2010').
>.     compute pv=' '.
>.  else.
>.     compute pv=char.substr(temp,1,1).
>.  end if.
>end repeat.
>
>The problem is that this overwrites anything found in the first
>variables v1 to v39, it only reads the last variable v40.

Right; as you can see, whenever the code reads a new variable it
resets variable 'pv', to either blank or the first character of the
new variable, and loses anything it found before.

>There should be a loop over the variable set which stops if and when
>the search for a string beginning with a number which is not part of a date.

Look at "END LOOP IF <test>".

It looks like you want 'pv' to have the value of the first character
of the first non-blank variable whose initial character is not 'A' or
'B', or beginning with '2010'. If that's all you want, you stop when
'pv' is no longer blank. Something like this (but not tested):

string pv (a1).
VECTOR temp=v1 to v40
LOOP #Vnum = 1 TO 40.
.  do if   (CHAR.SUBSTR(temp(#VNum),1,1)='A'
          |  CHAR.SUBSTR(temp(#VNum),1,1)='B'
          | (CHAR.SUBSTR(temp(#VNum),1,4)='2010').
.     compute pv=' '.
.  else.
.     compute pv=char.substr(temp(#VNum),1,1).
.  end if.
END LOOP IF (pv NE ' ').

You write,

>*From the strings with a number and two dates, I want to extract the
>first number. Or if possible, also the two dates, each in their own variables.

You should be able to do that by expanding the 'else' clause,
something like this (but still untested, and this code has many
opportunities for syntax slips):

string pv (a1).
NUMERIC date1 date2 (DATE11).
VECTOR temp=v1 to v40
LOOP #Vnum = 1 TO 40.
.  do if   (CHAR.SUBSTR(temp(#VNum),1,1)='A'
          |  CHAR.SUBSTR(temp(#VNum),1,1)='B'
          | (CHAR.SUBSTR(temp(#VNum),1,4)='2010').
.     compute pv=' '.
.  else.
.     compute pv   =char.substr(temp(#VNum),1,1).

.     COMPUTE #yr1 = NUMBER(CHAR.SUBSTR(temp(#VNum),02,4),F4).
.     COMPUTE #mo1 = NUMBER(CHAR.SUBSTR(temp(#VNum),06,2),F2).
.     COMPUTE #dy1 = NUMBER(CHAR.SUBSTR(temp(#VNum),08,2),F2).
.     COMPUTE date1= DATE.MDY(#mo1,#dy1,#yr1).

.     COMPUTE #yr2 = NUMBER(CHAR.SUBSTR(temp(#VNum),10,4),F4).
.     COMPUTE #mo2 = NUMBER(CHAR.SUBSTR(temp(#VNum),14,2),F2).
.     COMPUTE #dy2 = NUMBER(CHAR.SUBSTR(temp(#VNum),16,2),F2).
.     COMPUTE date2= DATE.MDY(#mo2,#dy2,#yr2).
.  end if.
END LOOP IF (pv NE ' ').


P.S. You don't need to use 'execute'.

=====================
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
|  
Report Content as Inappropriate

Re: Lost in loops and vectors...

Albert-Jan Roskam
In reply to this post by Robert Lundqvist-3
Hi Robert!

This is untested because I don't have spss on my laptop:

string #target (a17) sign (a1) begindate (a8) enddate (a8).
do repeat temp = v1 to v40.
+if (not ( (CHAR.SUBSTR(temp,1,1) eq 'A' | CHAR.SUBSTR(temp,1,1) eq 'B' | (CHAR.SUBSTR(temp,1,4) eq '2010') )) #target = temp.
end repeat print.
compute sign = substr(#target, 1, 1).
compute begindate = substr(#target, 2, 8).
compute enddate = substr(#target, 10, 8).
fre sign.

You should be absolutely sure you don;t have more than one target value within each record.
 
Cheers!!
Albert-Jan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



From: Robert Lundqvist <[hidden email]>
To: [hidden email]
Sent: Tue, December 28, 2010 5:24:41 PM
Subject: [SPSSX-L] Lost in loops and vectors...

I have not been able to solve a problem which should be fairly straightforward, but I seem to be lost in loops. Any suggestions how to solve this would be most appreciated. The story goes like this:

*The dataset consists of (among others) a set of variables (right now 39) containing either strings beginning with the letter P ("P20100101...", of length 17), shorter strings beginning with one of a limited set of letters ("A123", "B234",..., of length 4 or 5), dates ("2010020300000000" of length 16) or strings beginning with a number followed by two dates ("12010020420100305", length 17).

*The variables can contain any of these or be missing, so for one case there might only be values in the first variable and missing in the rest, whereas for another case, there might be a series of P20100101...-strings in each of the variables.

*Only the latter, strings with a number and two dates are interesting. From these I want to extract the first number. Or if possible, also the two dates, each in their own variables.

My attempts so far has comprised something like

string pv (a1).
do repeat temp=v1 to v40.
do if  (CHAR.SUBSTR(temp,1,1)='A' | CHAR.SUBSTR(temp,1,1)='B' | (CHAR.SUBSTR(temp,1,4)='2010').
compute pv=' '.
else.
compute pv=char.substr(temp,1,1).
end if.
end repeat.
execute.

The problem is that this overwrites anything found in the first variables v1 to v39, it only reads the last variable v40. There should be a loop over the variable set which stops if and when the search for a string beginning with a number which is not part of a date.

I guess there will be some vector and looping involved, but I am stuck. Any suggestions?

Robert
***************************
Robert Lundqvist
Norrbotten regional council
Lulea
Sweden

=====================
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
|  
Report Content as Inappropriate

Re: Lost in loops and vectors...

Jon K Peck
In reply to this post by Richard Ristow
See below.

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        Richard Ristow <[hidden email]>
To:        [hidden email]
Date:        12/29/2010 11:52 AM
Subject:        Re: [SPSSX-L] Lost in loops and vectors...
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




At 11:24 AM 12/28/2010, Robert Lundqvist wrote:

>*The dataset includes a set of variables containing either strings
>beginning with the letter P, strings beginning with one of a limited
>set of letters ("A123", "B234",..., of length 4 or 5), dates
>("2010020300000000" of length 16) or strings beginning with a number
>followed by two dates ("12010020420100305", length 17).
>
>*Only the latter, strings with a number and two dates are
>interesting. From these I want to extract the first number. Or if
>possible, also the two dates, each in their own variables.
>
>My attempts so far has comprised something like
>
>string pv (a1).
>do repeat temp=v1 to v40.
>.  do if   (CHAR.SUBSTR(temp,1,1)='A'
>          |  CHAR.SUBSTR(temp,1,1)='B'
>          | (CHAR.SUBSTR(temp,1,4)='2010').
>.     compute pv=' '.
>.  else.
>.     compute pv=char.substr(temp,1,1).
>.  end if.
>end repeat.
>
>The problem is that this overwrites anything found in the first
>variables v1 to v39, it only reads the last variable v40.

Right; as you can see, whenever the code reads a new variable it
resets variable 'pv', to either blank or the first character of the
new variable, and loses anything it found before.

>There should be a loop over the variable set which stops if and when
>the search for a string beginning with a number which is not part of a date.

Look at "END LOOP IF <test>".

It looks like you want 'pv' to have the value of the first character
of the first non-blank variable whose initial character is not 'A' or
'B', or beginning with '2010'. If that's all you want, you stop when
'pv' is no longer blank. Something like this (but not tested):

string pv (a1).
VECTOR temp=v1 to v40
LOOP #Vnum = 1 TO 40.
.  do if   (CHAR.SUBSTR(temp(#VNum),1,1)='A'
         |  CHAR.SUBSTR(temp(#VNum),1,1)='B'
         | (CHAR.SUBSTR(temp(#VNum),1,4)='2010').
.     compute pv=' '.
.  else.
.     compute pv=char.substr(temp(#VNum),1,1).
.  end if.
END LOOP IF (pv NE ' ').

>>>Slightly more readable IMO is to use the simple LOOP/END LOOP commands and just insert

BREAK.
after the second compute.  (The two results would be slightly different if the second compute could ever assign a blank value.)

Regards,
Jon Peck
Loading...