Hello you two again, and thank you very much for your help!
Gutnre wrote:compute var2 = var1.
I tried that at first, but SPSS kept telling me something that I interpreted as the following: You can only create numeric variables with "compute". A string variable has to be defined beforehand. (I can't post it as it is in German.)
Penguin_Knight wrote:On the contrary, if var2 has not be declared as string before, even with ('1'='1'), the code will not run.
Thank you. I didn't know that.
But, actually, there is a problem with both solutions:
If I create the string variable var2 I have got to assign a length. But what if I don't know yet how long var1 will be? I can set the length of var2 to a10000, but there might still be some jerk among my subjects who wants to write a romance in this special question, and then SPSS will chop off the last characters if I try to copy var1 into the limited var2 – in the first solution even whitout a notification!
I just want to copy a string variable – no matter what length the original variable has… That should be possible!
Thanks again for your help,