I have not often dealt with multiple missing values in string variables other than "blank" and " ".
I was surprised by the errors from the syntax below. Unless I missed it when I did <help> perhaps the <help> and error message should clarify that certain characters are not admissible in a string used to specify a missing value. Of the 5 commands below only the 4th works. new file. data list list/kind (f1) Mystring (a25). begin data 1 "abcde fghij klmno' 1 "what ever it might be" 1 "blank" 1 "some real text" 1 "blank" 2 "abcde fghij klmno' 2 "what ever it might be" 2 "blank" 2 "some real text" 2 "blank" end data. dataset name testmissing. dataset activate testmissing. do if kind eq 2. compute mystring = "auto skip". end if. missing values mystring ("blank","auto skip",""). *. missing values mystring ("blank","auto.skip",""). *. missing values mystring ("blank","auto_skip",""). *. missing values mystring ("blank","AutoSkip",""). *. missing values mystring ("blank","AutoSkip","n/a").
Art Kendall
Social Research Consultants |
The error message appears to have changed
to something that has nothing to do with the actual error. Missing values
for string values cannot exceed 8 bytes, and that's the error message that
used to be displayed.
Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Art Kendall <[hidden email]> To: [hidden email] Date: 10/21/2014 11:41 AM Subject: Surpise about what values can be used as missing values in a string variable. Sent by: "SPSSX(r) Discussion" <[hidden email]> I have not often dealt with multiple missing values in string variables other than "blank" and " ". I was surprised by the errors from the syntax below. Unless I missed it when I did <help> perhaps the <help> and error message should clarify that certain characters are not admissible in a string used to specify a missing value. Of the 5 commands below only the 4th works. new file. data list list/kind (f1) Mystring (a25). begin data 1 "abcde fghij klmno' 1 "what ever it might be" 1 "blank" 1 "some real text" 1 "blank" 2 "abcde fghij klmno' 2 "what ever it might be" 2 "blank" 2 "some real text" 2 "blank" end data. dataset name testmissing. dataset activate testmissing. do if kind eq 2. compute mystring = "auto skip". end if. missing values mystring ("blank","auto skip",""). *. missing values mystring ("blank","auto.skip",""). *. missing values mystring ("blank","auto_skip",""). *. missing values mystring ("blank","AutoSkip",""). *. missing values mystring ("blank","AutoSkip","n/a"). ----- Art Kendall Social Research Consultants -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Surpise-about-what-values-can-be-used-as-missing-values-in-a-string-variable-tp5727660.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 |
In reply to this post by Art Kendall
On further investigation, the unhelpful
error message seems to occur only in a very specific set of circumstances:
multiple missing values specified and one is both longer than 8 bytes and
contains a space.
Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Rick Oliver/Chicago/IBM To: Art Kendall <[hidden email]> Cc: [hidden email] Date: 10/21/2014 11:57 AM Subject: Re: Surpise about what values can be used as missing values in a string variable. The error message appears to have changed to something that has nothing to do with the actual error. Missing values for string values cannot exceed 8 bytes, and that's the error message that used to be displayed. Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: Art Kendall <[hidden email]> To: [hidden email] Date: 10/21/2014 11:41 AM Subject: Surpise about what values can be used as missing values in a string variable. Sent by: "SPSSX(r) Discussion" <[hidden email]> I have not often dealt with multiple missing values in string variables other than "blank" and " ". I was surprised by the errors from the syntax below. Unless I missed it when I did <help> perhaps the <help> and error message should clarify that certain characters are not admissible in a string used to specify a missing value. Of the 5 commands below only the 4th works. new file. data list list/kind (f1) Mystring (a25). begin data 1 "abcde fghij klmno' 1 "what ever it might be" 1 "blank" 1 "some real text" 1 "blank" 2 "abcde fghij klmno' 2 "what ever it might be" 2 "blank" 2 "some real text" 2 "blank" end data. dataset name testmissing. dataset activate testmissing. do if kind eq 2. compute mystring = "auto skip". end if. missing values mystring ("blank","auto skip",""). *. missing values mystring ("blank","auto.skip",""). *. missing values mystring ("blank","auto_skip",""). *. missing values mystring ("blank","AutoSkip",""). *. missing values mystring ("blank","AutoSkip","n/a"). ----- Art Kendall Social Research Consultants -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Surpise-about-what-values-can-be-used-as-missing-values-in-a-string-variable-tp5727660.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 |
Free forum by Nabble | Edit this page |