|
Hello, you may change it into a small macro:
* Define the macro name as "vartitle" with a token as "inlist".
DEFINE !vartitle (inlist = !ENCLOSE("(",")")).
!DO !I !IN (!inlist).
TABLES
/FORMAT BLANK MISSING('.')
/TABLES !I
BY (STATISTICS)
/TITLE !QUOTE(!I) .
!DOEND .
!ENDDEFINE .
* Evoke the macro with the variable of your choice.
!vartitle inlist = (income).
EXE .
<><><><><>
If you have multiple varialbe, just expand the "inlist", e.g.
!vartitle inlist = (income gender education ethnicity).
EXE.
Then you should be able to get the tables.
Hope this helps.
Ken
On Wed, 13 Jun 2007 02:57:20 -0400, Kevin Wong <flutter8888@YAHOO.COM.CN> wrote:
>Hello,everybody:
> I always use the spss syntax to create a lot of tables in my work,but I
>am worried about a problem about the titles of the tables.For example:
> * Basic Tables.
>TABLES
> /FORMAT BLANK MISSING('.')
> /TABLES income
> BY (STATISTICS)
> /TITLE 'income'.
>
>Only the constant character string can be specified in the title
>subcommand ,but I hope to automatically display the variable label as
>title in spss syntax ,such as:
>
> * Basic Tables.
>TABLES
> /FORMAT BLANK MISSING('.')
> /TABLES income
> BY (STATISTICS)
> /TITLE var label.
>
>When executed,a warning occurs.
>
>So can you fix this issue in some way?
>Help me!
|