Value Labels causing "unknown error"

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

Value Labels causing "unknown error"

Catherine Kubitschek

Hi, all.

 

I’m getting an error message when I run VALUE LABELS before I run TABLES. Without the VALUE LABELS I get no error.

 

Some details would help so…

 

I’m running SPSS 20.0.0.1 on a Windows 7 64bit computer with 8GB of RAM. I’ve tried this on two computer (basically clones of each other). I’ve tried restarting the computer.

 

I’m getting the following error message when I execute a TABLES command after a VALUE LABELS command.

 

      IBM SPSS Statistics 20

      An unknown error has terminated communication with the processor. The SPSS Statistics Processor is unavailable.

 

I’ve tried to search the list archives and I googled the error message and the closest I found was http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14883620 – right error, different cause. I did try closing the output window before the VALUE LABELS, before the TABLES but it made no difference.

                                                                                                                                                                                                                      

I can’t see anything wrong with the VALUE LABELS syntax and I’ve copied it into and out of a text editor to strip any non-standard characters that might have existed.

 

I can boil my syntax down to:

 

** This version produces the error ******************************************.

get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .

 

set printback on .

 

value labels ipeds_hr_category_code

    '25-1000-PIC' '1.25-1000-PIC'

    '25-1000-PIE' '2.25-1000-PIE'

    '25-1000-PIB' '3.25-1000-PIB'

    '25-1000-IRP' '4.25-1000-IRP'

    '25-1000-PR'  '5.25-1000-PR'

    '25-4010-N'   '7.25-4010-N'

    '25-4020-N'   '8.25-4020-N'

    '25-4030-N'   '9.25-4030-N'

    '11-0000-N'   '11.11-0000-N'

    '13-0000-N'   '12.13-0000-N'

    '15-0000-N'   '13.15-0000-N'

    '21-0000-N'   '14.21-0000-N'

    '29-0000-N'   '15.29-0000-N'

    '31-0000-N'   '16.31-0000-N'

    '41-0000-N'   '17.41-0000-N'

    '43-0000-N'   '18.43-0000-N'

    '45-0000-N'   '19.45-0000-N'

    '51-0000-N'   '20.51-0000-N'

    '25-1191-GAT' '21.25-1191-GAT'

    '25-1191-GAR' '22.25-1191-GAR'

    '25-1191-N'   '23.25-1191-N' .

 

TABLES /FORMAT BLANK MISSING('.')

       /FTOTAL=T1 'Total' T2 'Subtotal'

       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1

       /STATISTICS= count('')

       /TITLE 'Audits, Fall 2012' .

** End  version producing the error ******************************************.

 

 

** This version does not produce the error ************************************ .

get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .

 

set printback on .

 

TABLES /FORMAT BLANK MISSING('.')

       /FTOTAL=T1 'Total' T2 'Subtotal'

       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1

       /STATISTICS= count('')

       /TITLE 'Audits, Fall 2012' .

** End  version that does not produce the error ******************************** .

 

I want to use the value labels because without them I can’t see enough of the value to be useful and I get this warning:

 

      Text: ipeds_hr_category_code

      TABLES procedure cannot use character variables longer than eight characters. Only the first eight will be used.

 

Can anyone see what I’ve done wrong in the value labels command? Has anyone else run into anything like this? Any suggestions for what I might try next for debugging?

 

Thanks in advance.

 

Catherine Kubitschek                              ([hidden email])

IR Sr. Analyst & Programmer

   Office of

Strategic Planning & Institutional Research

403B Grace Hall

University of Notre Dame

Notre Dame, IN 46556-5611

Ph: 574/631-3550 | Fx: 574/631-9235 | http://ospir.nd.edu

 

Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

David Marso
Administrator
Maybe you should look at the AUTORECODE command?  String variables are an utter PITA.
--
Catherine Kubitschek wrote
Hi, all.

I'm getting an error message when I run VALUE LABELS before I run TABLES. Without the VALUE LABELS I get no error.

Some details would help so...

I'm running SPSS 20.0.0.1 on a Windows 7 64bit computer with 8GB of RAM. I've tried this on two computer (basically clones of each other). I've tried restarting the computer.

I'm getting the following error message when I execute a TABLES command after a VALUE LABELS command.

      IBM SPSS Statistics 20
      An unknown error has terminated communication with the processor. The SPSS Statistics Processor is unavailable.

I've tried to search the list archives and I googled the error message and the closest I found was http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14883620 - right error, different cause. I did try closing the output window before the VALUE LABELS, before the TABLES but it made no difference.

I can't see anything wrong with the VALUE LABELS syntax and I've copied it into and out of a text editor to strip any non-standard characters that might have existed.

I can boil my syntax down to:

** This version produces the error ******************************************.
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .

set printback on .

value labels ipeds_hr_category_code
    '25-1000-PIC' '1.25-1000-PIC'
    '25-1000-PIE' '2.25-1000-PIE'
    '25-1000-PIB' '3.25-1000-PIB'
    '25-1000-IRP' '4.25-1000-IRP'
    '25-1000-PR'  '5.25-1000-PR'
    '25-4010-N'   '7.25-4010-N'
    '25-4020-N'   '8.25-4020-N'
    '25-4030-N'   '9.25-4030-N'
    '11-0000-N'   '11.11-0000-N'
    '13-0000-N'   '12.13-0000-N'
    '15-0000-N'   '13.15-0000-N'
    '21-0000-N'   '14.21-0000-N'
    '29-0000-N'   '15.29-0000-N'
    '31-0000-N'   '16.31-0000-N'
    '41-0000-N'   '17.41-0000-N'
    '43-0000-N'   '18.43-0000-N'
    '45-0000-N'   '19.45-0000-N'
    '51-0000-N'   '20.51-0000-N'
    '25-1191-GAT' '21.25-1191-GAT'
    '25-1191-GAR' '22.25-1191-GAR'
    '25-1191-N'   '23.25-1191-N' .

TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version producing the error ******************************************.


** This version does not produce the error ************************************ .
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .

set printback on .

TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version that does not produce the error ******************************** .

I want to use the value labels because without them I can't see enough of the value to be useful and I get this warning:

      Text: ipeds_hr_category_code
      TABLES procedure cannot use character variables longer than eight characters. Only the first eight will be used.

Can anyone see what I've done wrong in the value labels command? Has anyone else run into anything like this? Any suggestions for what I might try next for debugging?

Thanks in advance.

Catherine Kubitschek                              ([hidden email]<mailto:[hidden email]>)
IR Sr. Analyst & Programmer
   Office of
Strategic Planning & Institutional Research
403B Grace Hall
University of Notre Dame
Notre Dame, IN 46556-5611
Ph: 574/631-3550 | Fx: 574/631-9235 | http://ospir.nd.edu<http://ospir.nd.edu/>
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

John F Hall
In reply to this post by Catherine Kubitschek

Catherine

 

Your syntax copied into MS Outlook with curly quotes, which SPSS doesn't like.  However this may have been because of the settings on my machine (which I've now changed).

 

David's suggestion of AUTORECODE makes sense as it's better (and a lot quicker) to work with numeric rather than string values.  However, your string values are not in strict alphabetic order so the numeric recoding will not match your posted list.  String variables being recoded to numeric have to be given new variable names.  Also working with long variable names is cumbersome if you work in syntax, but it looks as if you're on the GUI.

 

Page 220 of the manual (Click on Help > Command Syntax Reference) says:

 

If the original value had a label, that label is used for the corresponding new value. If the original value did not have a label, the old value itself is used as the value label for the new value.

 

Something like the following (untested) should work and keep your value labels in the order posted:

 

recode ipeds_hr_category_code

    ('25-1000-PIC'=1)

   ('25-1000-PIE'=2)

    ('25-1000-PIB'=3)

    ('25-1000-IRP'=4)

    ('25-1000-PR'=5)

    ('25-4010-N'=7)

    ('25-4020-N'=8)

    ('25-4030-N'=9)

    ('11-0000-N'=11)

    ('13-0000-N'=12)

    ('15-0000-N'=13)

    ('21-0000-N'=14)

    ('29-0000-N'=15)

    ('31-0000-N'=16)

    ('41-0000-N'=17)

    ('43-0000-N'=18)

    ('45-0000-N'=19)

    ('51-0000-N'=20)

    ('25-1191-GAT'=21)

    ('25-1191-GAR'=22)

    ('25-1191-N'=23)

into newipeds_hr_category_code.

 

value labels newipeds_hr_category_code

    1 '25-1000-PIC'

    2 '25-1000-PIE'

    3 '25-1000-PIB'

    4 '25-1000-IRP'

   5 '25-1000-PR'

    7 '25-4010-N'

    8  '25-4020-N'

    9 '25-4030-N' 

    11 '11-0000-N'  

    12 '13-0000-N'

    13 '15-0000-N'

    14 '21-0000-N' 

    15 '29-0000-N'  

    16 '31-0000-N' 

    17 '41-0000-N'

    18 '43-0000-N' 

    19 '45-0000-N'

    20 '51-0000-N'  

    21 '25-1191-GAT'

    22 '25-1191-GAR'

    23 '25-1191-N'  .

 

The new variable will be appended to the end of your data file, but can be dragged up to wherever you want it.

 

If you're a newbie to SPSS there is a set of SPSS tutorials on my site and also links to other on-line resources.

 

 

John F Hall (Mr)

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

Catherine Kubitschek

John and David,

 

Thanks for your speedy replies.

 

The curly quotes were fine before Outlook. Sorry I missed the switch.

 

Thanks for the recode suggestion. I bogged down on the error message and completely spaced on that possibility. Simply autorecoding would indeed have messed with a necessary order in the table banner.

 

I don’t know whether to thank you for thinking my syntax came from the GUI or not J. It was hand written (I’m not really good with the GUI) so a special thanks for writing out the recode and value labels for me. Far above and beyond what I’d hoped for.

 

And, your code worked like a charm. No error, table with the columns in the right order, life is good!

 

Thanks again.

 

Catherine

 

Slightly off topic but… Long variable names are cumbersome while doing the initial coding but they’re really handy every year when we have to reproduce our analysis with a new year’s worth of slightly different data possibly using slightly different rules. I have to admit my first appreciation of Windows SPSS was the expansion from 8 character names.

 

 

From: John F Hall [mailto:[hidden email]]
Sent: Friday, September 14, 2012 11:29 PM
To: Catherine Kubitschek; [hidden email]
Subject: RE: Value Labels causing "unknown error"

 

Catherine

 

Your syntax copied into MS Outlook with curly quotes, which SPSS doesn't like.  However this may have been because of the settings on my machine (which I've now changed).

 

David's suggestion of AUTORECODE makes sense as it's better (and a lot quicker) to work with numeric rather than string values.  However, your string values are not in strict alphabetic order so the numeric recoding will not match your posted list.  String variables being recoded to numeric have to be given new variable names.  Also working with long variable names is cumbersome if you work in syntax, but it looks as if you're on the GUI.

 

Page 220 of the manual (Click on Help > Command Syntax Reference) says:

 

If the original value had a label, that label is used for the corresponding new value. If the original value did not have a label, the old value itself is used as the value label for the new value.

 

Something like the following (untested) should work and keep your value labels in the order posted:

 

recode ipeds_hr_category_code

    ('25-1000-PIC'=1)

   ('25-1000-PIE'=2)

    ('25-1000-PIB'=3)

    ('25-1000-IRP'=4)

    ('25-1000-PR'=5)

    ('25-4010-N'=7)

    ('25-4020-N'=8)

    ('25-4030-N'=9)

    ('11-0000-N'=11)

    ('13-0000-N'=12)

    ('15-0000-N'=13)

    ('21-0000-N'=14)

    ('29-0000-N'=15)

    ('31-0000-N'=16)

    ('41-0000-N'=17)

    ('43-0000-N'=18)

    ('45-0000-N'=19)

    ('51-0000-N'=20)

    ('25-1191-GAT'=21)

    ('25-1191-GAR'=22)

    ('25-1191-N'=23)

into newipeds_hr_category_code.

 

value labels newipeds_hr_category_code

    1 '25-1000-PIC'

    2 '25-1000-PIE'

    3 '25-1000-PIB'

    4 '25-1000-IRP'

   5 '25-1000-PR'

    7 '25-4010-N'

    8  '25-4020-N'

    9 '25-4030-N' 

    11 '11-0000-N'  

    12 '13-0000-N'

    13 '15-0000-N'

    14 '21-0000-N' 

    15 '29-0000-N'  

    16 '31-0000-N' 

    17 '41-0000-N'

    18 '43-0000-N' 

    19 '45-0000-N'

    20 '51-0000-N'  

    21 '25-1191-GAT'

    22 '25-1191-GAR'

    23 '25-1191-N'  .

 

The new variable will be appended to the end of your data file, but can be dragged up to wherever you want it.

 

If you're a newbie to SPSS there is a set of SPSS tutorials on my site and also links to other on-line resources.

 

 

John F Hall (Mr)

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

Albert-Jan Roskam
In reply to this post by Catherine Kubitschek
Hi,

Do you have the CTABLES optional module? TABLES has been obsolete for while and even though it's supposed to work, it might still be worth looking at CTABLES. You can convert existing TABLES code to CTABLES code using the syntaxconvert.exe tool in the spss installation dir. There is also an extension command to use the converter via the user interface (see the IBM website).
 
Regards,
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: Catherine Kubitschek <[hidden email]>
To: [hidden email]
Sent: Saturday, September 15, 2012 1:52 AM
Subject: [SPSSX-L] Value Labels causing "unknown error"

Hi, all.
 
I’m getting an error message when I run VALUE LABELS before I run TABLES. Without the VALUE LABELS I get no error.
 
Some details would help so…
 
I’m running SPSS 20.0.0.1 on a Windows 7 64bit computer with 8GB of RAM. I’ve tried this on two computer (basically clones of each other). I’ve tried restarting the computer.
 
I’m getting the following error message when I execute a TABLES command after a VALUE LABELS command.
 
      IBM SPSS Statistics 20
      An unknown error has terminated communication with the processor. The SPSS Statistics Processor is unavailable.
 
I’ve tried to search the list archives and I googled the error message and the closest I found was http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14883620 – right error, different cause. I did try closing the output window before the VALUE LABELS, before the TABLES but it made no difference.
                                                                                                                                                                                                                       
I can’t see anything wrong with the VALUE LABELS syntax and I’ve copied it into and out of a text editor to strip any non-standard characters that might have existed.
 
I can boil my syntax down to:
 
** This version produces the error ******************************************.
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .
 
set printback on .
 
value labels ipeds_hr_category_code
    '25-1000-PIC' '1.25-1000-PIC'
    '25-1000-PIE' '2.25-1000-PIE'
    '25-1000-PIB' '3.25-1000-PIB'
    '25-1000-IRP' '4.25-1000-IRP'
    '25-1000-PR'  '5.25-1000-PR'
    '25-4010-N'   '7.25-4010-N'
    '25-4020-N'   '8.25-4020-N'
    '25-4030-N'   '9.25-4030-N'
    '11-0000-N'   '11.11-0000-N'
    '13-0000-N'   '12.13-0000-N'
    '15-0000-N'   '13.15-0000-N'
    '21-0000-N'   '14.21-0000-N'
    '29-0000-N'   '15.29-0000-N'
    '31-0000-N'   '16.31-0000-N'
    '41-0000-N'   '17.41-0000-N'
    '43-0000-N'   '18.43-0000-N'
    '45-0000-N'   '19.45-0000-N'
    '51-0000-N'   '20.51-0000-N'
    '25-1191-GAT' '21.25-1191-GAT'
    '25-1191-GAR' '22.25-1191-GAR'
    '25-1191-N'   '23.25-1191-N' .
 
TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version producing the error ******************************************.
 
 
** This version does not produce the error ************************************ .
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .
 
set printback on .
 
TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version that does not produce the error ******************************** .
 
I want to use the value labels because without them I can’t see enough of the value to be useful and I get this warning:
 
      Text: ipeds_hr_category_code
      TABLES procedure cannot use character variables longer than eight characters. Only the first eight will be used.
 
Can anyone see what I’ve done wrong in the value labels command? Has anyone else run into anything like this? Any suggestions for what I might try next for debugging?
 
Thanks in advance.
 
Catherine Kubitschek                              ([hidden email])
IR Sr. Analyst & Programmer
   Office of
Strategic Planning & Institutional Research
403B Grace Hall
University of Notre Dame
Notre Dame, IN 46556-5611
Ph: 574/631-3550 | Fx: 574/631-9235 | http://ospir.nd.edu
 


Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

Catherine Kubitschek
Thanks for the suggestion. Yes, we're slowly switching over to CTABLES.

Sent from my iPad

On Sep 15, 2012, at 4:53 AM, "Albert-Jan Roskam" <[hidden email]> wrote:

Hi,

Do you have the CTABLES optional module? TABLES has been obsolete for while and even though it's supposed to work, it might still be worth looking at CTABLES. You can convert existing TABLES code to CTABLES code using the syntaxconvert.exe tool in the spss installation dir. There is also an extension command to use the converter via the user interface (see the IBM website).
 
Regards,
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: Catherine Kubitschek <[hidden email]>
To: [hidden email]
Sent: Saturday, September 15, 2012 1:52 AM
Subject: [SPSSX-L] Value Labels causing "unknown error"

Hi, all.
 
I’m getting an error message when I run VALUE LABELS before I run TABLES. Without the VALUE LABELS I get no error.
 
Some details would help so…
 
I’m running SPSS 20.0.0.1 on a Windows 7 64bit computer with 8GB of RAM. I’ve tried this on two computer (basically clones of each other). I’ve tried restarting the computer.
 
I’m getting the following error message when I execute a TABLES command after a VALUE LABELS command.
 
      IBM SPSS Statistics 20
      An unknown error has terminated communication with the processor. The SPSS Statistics Processor is unavailable.
 
I’ve tried to search the list archives and I googled the error message and the closest I found was http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14883620 – right error, different cause. I did try closing the output window before the VALUE LABELS, before the TABLES but it made no difference.
                                                                                                                                                                                                                       
I can’t see anything wrong with the VALUE LABELS syntax and I’ve copied it into and out of a text editor to strip any non-standard characters that might have existed.
 
I can boil my syntax down to:
 
** This version produces the error ******************************************.
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .
 
set printback on .
 
value labels ipeds_hr_category_code
    '25-1000-PIC' '1.25-1000-PIC'
    '25-1000-PIE' '2.25-1000-PIE'
    '25-1000-PIB' '3.25-1000-PIB'
    '25-1000-IRP' '4.25-1000-IRP'
    '25-1000-PR'  '5.25-1000-PR'
    '25-4010-N'   '7.25-4010-N'
    '25-4020-N'   '8.25-4020-N'
    '25-4030-N'   '9.25-4030-N'
    '11-0000-N'   '11.11-0000-N'
    '13-0000-N'   '12.13-0000-N'
    '15-0000-N'   '13.15-0000-N'
    '21-0000-N'   '14.21-0000-N'
    '29-0000-N'   '15.29-0000-N'
    '31-0000-N'   '16.31-0000-N'
    '41-0000-N'   '17.41-0000-N'
    '43-0000-N'   '18.43-0000-N'
    '45-0000-N'   '19.45-0000-N'
    '51-0000-N'   '20.51-0000-N'
    '25-1191-GAT' '21.25-1191-GAT'
    '25-1191-GAR' '22.25-1191-GAR'
    '25-1191-N'   '23.25-1191-N' .
 
TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version producing the error ******************************************.
 
 
** This version does not produce the error ************************************ .
get file='U:\Data\HR\HR001\AY1213\TestingInDEV\system\sHR001A_POP.sav' .
 
set printback on .
 
TABLES /FORMAT BLANK MISSING('.')
       /FTOTAL=T1 'Total' T2 'Subtotal'
       /TABLE= employee_type_code>rank_code+t1 by ipeds_hr_category_code+t1
       /STATISTICS= count('')
       /TITLE 'Audits, Fall 2012' .
** End  version that does not produce the error ******************************** .
 
I want to use the value labels because without them I can’t see enough of the value to be useful and I get this warning:
 
      Text: ipeds_hr_category_code
      TABLES procedure cannot use character variables longer than eight characters. Only the first eight will be used.
 
Can anyone see what I’ve done wrong in the value labels command? Has anyone else run into anything like this? Any suggestions for what I might try next for debugging?
 
Thanks in advance.
 
Catherine Kubitschek                              ([hidden email])
IR Sr. Analyst & Programmer
   Office of
Strategic Planning & Institutional Research
403B Grace Hall
University of Notre Dame
Notre Dame, IN 46556-5611
Ph: 574/631-3550 | Fx: 574/631-9235 | http://ospir.nd.edu
 


Reply | Threaded
Open this post in threaded view
|

Re: Value Labels causing "unknown error"

John F Hall
In reply to this post by Catherine Kubitschek

Catherine

 

So glad it worked OK.  Editing the original syntax was a bit fiddly, but it was a challenge I couldn't resist!  Use of CTRL+H to find and replace helped.  Does anyone know how to edit Word or Outlook in columns?  It would have been even quicker.

 

On variable names, I too appreciate the extension beyond 8 characters, but I like to keep everything on screen.  I work almost exclusively in syntax and also want to avoid Repetitive Strain Injury (RSI) from intensive typing.   Value labels used to be limited to 20 characters (only 16 in two blocks of 8 in column headings)  Forty years ago, this made for some tortuous if creative labelling, but long value labels need to be discouraged if you want to see them on screen: even dragging the separators can leave most of them off-screen.  

 

Some major regular surveys such as British Social Attitudes, European Social Survey and others still use 8-character mnemonic varnames, and keep them constant across waves.  This makes longitudinal analysis simpler, but difficult to work from the questionnaires with unless the they have the variable names super-imposed.  I prefer to use positional variable names that relate directly to the original questionnaires or data capture documents where these use data locations (as per 80-col Hollerith cards) otherwise  I use the question numbers as variable names for later surveys using CAPI etc.   In my tutorials I use screen-snips from facsimile questionnaires so that users can see the original question(s) alongside the related syntax and research task(s).  This is where a library of RENAME VARIABLES commands comes in handy for switching between the two conventions for the same data set.

 

Enjoy the rest of the weekend.

 

John

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

 

 

 

 

 

From: Catherine Kubitschek [mailto:[hidden email]]
Sent: 15 September 2012 10:20
To: 'John F Hall'; [hidden email]; 'David Marso'
Subject: RE: Value Labels causing "unknown error"

 

John and David,

 

Thanks for your speedy replies.

 

The curly quotes were fine before Outlook. Sorry I missed the switch.

 

Thanks for the recode suggestion. I bogged down on the error message and completely spaced on that possibility. Simply autorecoding would indeed have messed with a necessary order in the table banner.

 

I don’t know whether to thank you for thinking my syntax came from the GUI or not J. It was hand written (I’m not really good with the GUI) so a special thanks for writing out the recode and value labels for me. Far above and beyond what I’d hoped for.

 

And, your code worked like a charm. No error, table with the columns in the right order, life is good!

 

Thanks again.

 

Catherine

 

Slightly off topic but… Long variable names are cumbersome while doing the initial coding but they’re really handy every year when we have to reproduce our analysis with a new year’s worth of slightly different data possibly using slightly different rules. I have to admit my first appreciation of Windows SPSS was the expansion from 8 character names.

 

 

From: John F Hall [[hidden email]]
Sent: Friday, September 14, 2012 11:29 PM
To: Catherine Kubitschek; [hidden email]
Subject: RE: Value Labels causing "unknown error"

 

Catherine

 

Your syntax copied into MS Outlook with curly quotes, which SPSS doesn't like.  However this may have been because of the settings on my machine (which I've now changed).

 

David's suggestion of AUTORECODE makes sense as it's better (and a lot quicker) to work with numeric rather than string values.  However, your string values are not in strict alphabetic order so the numeric recoding will not match your posted list.  String variables being recoded to numeric have to be given new variable names.  Also working with long variable names is cumbersome if you work in syntax, but it looks as if you're on the GUI.

 

Page 220 of the manual (Click on Help > Command Syntax Reference) says:

 

If the original value had a label, that label is used for the corresponding new value. If the original value did not have a label, the old value itself is used as the value label for the new value.

 

Something like the following (untested) should work and keep your value labels in the order posted:

 

recode ipeds_hr_category_code

    ('25-1000-PIC'=1)

   ('25-1000-PIE'=2)

    ('25-1000-PIB'=3)

    ('25-1000-IRP'=4)

    ('25-1000-PR'=5)

    ('25-4010-N'=7)

    ('25-4020-N'=8)

    ('25-4030-N'=9)

    ('11-0000-N'=11)

    ('13-0000-N'=12)

    ('15-0000-N'=13)

    ('21-0000-N'=14)

    ('29-0000-N'=15)

    ('31-0000-N'=16)

    ('41-0000-N'=17)

    ('43-0000-N'=18)

    ('45-0000-N'=19)

    ('51-0000-N'=20)

    ('25-1191-GAT'=21)

    ('25-1191-GAR'=22)

    ('25-1191-N'=23)

into newipeds_hr_category_code.

 

value labels newipeds_hr_category_code

    1 '25-1000-PIC'

    2 '25-1000-PIE'

    3 '25-1000-PIB'

    4 '25-1000-IRP'

   5 '25-1000-PR'

    7 '25-4010-N'

    8  '25-4020-N'

    9 '25-4030-N' 

    11 '11-0000-N'  

    12 '13-0000-N'

    13 '15-0000-N'

    14 '21-0000-N' 

    15 '29-0000-N'  

    16 '31-0000-N' 

    17 '41-0000-N'

    18 '43-0000-N' 

    19 '45-0000-N'

    20 '51-0000-N'  

    21 '25-1191-GAT'

    22 '25-1191-GAR'

    23 '25-1191-N'  .

 

The new variable will be appended to the end of your data file, but can be dragged up to wherever you want it.

 

If you're a newbie to SPSS there is a set of SPSS tutorials on my site and also links to other on-line resources.

 

 

John F Hall (Mr)

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com