| Date: | Tue, 21 Jun 2005 00:53:32 -0400 |
| Reply-To: | Richard Ristow <wrristow@mindspring.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Richard Ristow <wrristow@mindspring.com> |
| Subject: | Re: multiple samples |
|
|
| In-Reply-To: | <s2b6cc79.039@GWMAIN.luhs.org> |
| Content-Type: | text/plain; charset="us-ascii"; format=flowed |
|---|
>>> "Raffe, Sydelle, SSA" <DRaffe@acgov.org> 6/20/2005 1:49 PM >>>
asked,
>Thanks for your response.
>I am macro deficient. Here's the error to the following syntax comand.
>
> define new_files (iteration = !cmdend).
>
> >Error # 6803 in column 8. Text: NEW_FILES
> >The macro name specified on the DEFINE command is a reserved word or
> is
> >otherwise invalid as a macro name.
> >This command not executed.
>
>
> >Warning # 6813 in column 19. Text: ITERATION
> >The DEFINE command includes a parameter with a name of over 7
> characters.
> >The limit is 7 before being prefixed with an exclamation point. The
> name
> >will be truncated.
What SPSS version are you using? "NEW_FILES" and "ITERATION" are both
over 8 characters long, which is OK in SPSS 12 and 13, but not earlier.
If you're using anything before 12, maybe this will work. It's exactly
what John Norton posted, but with names shortened:
DEFINE new_fi (suffix = !CMDEND).
!DO !I !IN (!suffix).
DO IF (x = !I).
!CONCAT("XSAVE OUTFILE = 'c:\temp\sub_file_",!I,".sav'.").
END IF.
EXE.
!DOEND.
!ENDDEFINE.
new_fi suffix = 1 2 3 4 5 6 7 8.
|