I’m doing this: * MISSING DATA PATTERN. MISSING VALUES ALL(). * 48 POSSIBLE. STRING #A1(A6) #A2(A17) #A3(A2) #A4(A1) #A5(A9) #A6(A13) PATTERN(A48). * Q1-6. RECODE Q1 Q2 TO Q6('Missing'='0')(ELSE='1'). ALTER TYPE Q1 Q2 TO Q6(A1). DO REPEAT X=Q1 Q2 TO Q6. + COMPUTE #A1=CONCAT(RTRIM(#A1),X). END REPEAT. I get a warning on the recode because the values differ in length but that is not the question. The question is this. I get this error six times, once for each variable named on the do repeat.
Error # 4311 in column 32. Text: ) The string argument required for the function specified was not supplied. Execution of this command stops. Any insights? Thanks, Gene Maguin
|
Are the Q variables numeric or string?
Rick Oliver Senior Information Developer IBM Business Analytics (SPSS) E-mail: [hidden email] From: "Maguin, Eugene" <[hidden email]> To: [hidden email] Date: 01/22/2016 09:29 AM Subject: String function problem Sent by: "SPSSX(r) Discussion" <[hidden email]> I’m doing this: * MISSING DATA PATTERN. MISSING VALUES ALL(). * 48 POSSIBLE. STRING #A1(A6) #A2(A17) #A3(A2) #A4(A1) #A5(A9) #A6(A13) PATTERN(A48). * Q1-6. RECODE Q1 Q2 TO Q6('Missing'='0')(ELSE='1'). ALTER TYPE Q1 Q2 TO Q6(A1). DO REPEAT X=Q1 Q2 TO Q6. + COMPUTE #A1=CONCAT(RTRIM(#A1),X). END REPEAT. I get a warning on the recode because the values differ in length but that is not the question. The question is this. I get this error six times, once for each variable named on the do repeat. Error # 4311 in column 32. Text: ) The string argument required for the function specified was not supplied. Execution of this command stops. Any insights? Thanks, Gene Maguin ===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@...(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 Maguin, Eugene
The problem is that scratch variables go away after a data pass, and ALTER TYPE causes a data pass when the type change requires modifying the data, as here. Move the STRING command for your scratch variables to after the ALTER TYPE. On Fri, Jan 22, 2016 at 8:28 AM, Maguin, Eugene <[hidden email]> wrote:
|
In reply to this post by Maguin, Eugene
They are all string.
From: Rick Oliver [mailto:[hidden email]]
Are the Q variables numeric or string?
===================== 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 Jon Peck
Yes, I understand. Thank you. I was reading about alter type and saw that point in the ‘Operations’ subsection but didn’t put that statement into the larger context
of my command sequence. Gene Maguin From: Jon Peck [mailto:[hidden email]]
The problem is that scratch variables go away after a data pass, and ALTER TYPE causes a data pass when the type change requires modifying the data, as here. Move the STRING command for your scratch variables
to after the ALTER TYPE. On Fri, Jan 22, 2016 at 8:28 AM, Maguin, Eugene <[hidden email]> wrote:
-- Jon K Peck |
Free forum by Nabble | Edit this page |