Help with macros

Posted by Eleonora Sidorova on
URL: http://spssx-discussion.165.s1.nabble.com/Help-with-macros-tp5740865.html

Define !test ( List=!Noexp !Enclose('{', '}')
               /Char=!Default('ยต') !Noexp !Enclose('{', '}')
               /Mis=!Default('$Sysmis') !Noexp !Enclose('{', '}')).

count ####NumCols=!List (MISSING,SYSMIS,LO THRU HI).

!Let !@Nvars=####NumCols.
do repeat x=!List /y=!Concat(!Char, 1) To !Concat(!Char, !@Nvars).
compute y=x.
end repeat.

!enddefine.

Hello everyone!

I am new on this forum and in SPSS Macro writing.
Please, can you indicate me the way to assign calculated variable ####NumCols to !@Nvars, to use it later in the syntax.

I've tried a lot of different ways but without success.

Thank you very much for any help.
Eleonora