Hi Everyone,
Happy Friday :). I am trying to move comments from 2 string variable (Q5 & Q6) that contain comments about all types of dogs into a newly created string variable created for each dog breed. Here is the logic I would like to use - it works with numeric but not with string, please let me know if you have any ideas. (This list has been shortened for everyone's sanity!) do repeat a=Q2_1 Q2_2 Q2_3 Q2_4 Q2_5 Q2_6 /b=q3_1 q3_2 q3_3 q3_4 q3_5 q3_6 /c=Q1beagle Q2poodle Q3schnauzer Q4germanshepard Q5retriever Q6pinscher. if (a=1) c=q5. if (b=1) c=q6. end repeat print. execute. Thanks for any ideas that you have, Jeanne ===================== 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 |
Administrator
|
Hard to say what you are really trying to do.
What error message(s) do you get when you run your code? Is everything in the a and b list numeric? Have the variables in the c list been declared previously using STRING? --- Happy first Friday of SPRING! Now when will winter get the message and stop snowing on my plants?
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?" |
In reply to this post by Jeanne Eidex
Did you initialize the new string variables first?
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jeanne Eidex Sent: Friday, March 22, 2013 11:24 AM To: [hidden email] Subject: [SPSSX-L] Manipulating String Variables Hi Everyone, Happy Friday :). I am trying to move comments from 2 string variable (Q5 & Q6) that contain comments about all types of dogs into a newly created string variable created for each dog breed. Here is the logic I would like to use - it works with numeric but not with string, please let me know if you have any ideas. (This list has been shortened for everyone's sanity!) do repeat a=Q2_1 Q2_2 Q2_3 Q2_4 Q2_5 Q2_6 /b=q3_1 q3_2 q3_3 q3_4 q3_5 q3_6 /c=Q1beagle Q2poodle Q3schnauzer Q4germanshepard Q5retriever Q6pinscher. if (a=1) c=q5. if (b=1) c=q6. end repeat print. execute. Thanks for any ideas that you have, Jeanne ===================== 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 PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== 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 |
Out of the office until 4/1/13. |
Free forum by Nabble | Edit this page |