spss script

#1
hi all
i'm only using spss for a few days now, so i'm sorry if i'm being stupid!
i need to create a variable which will use 3 other variables values to decide it's own.
i tried writing a script, but i odn't know how...
i tried :
if (variable1=1 and ...) variable_new=0.
i got an "unexpected text" error, so i added some :
dataset activate 'my_file_name.sav'.
dataset close 'my_file_name.sav'.
before and after, i still have the same error...
can anybody tell me how i should do that ?
i tried the tutorial, that's where i got the dataset thing, but i didn't find anything more usefull..
thank you ver much in advance
ps- and are there any other ways doing this ? i was hoping the record into different variable let me do that ....