DATA LIST question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DATA LIST question

John-342
I feel a bit dumb posting this, but can't seem to figure out why this is not
working (the space in My Documents folder?)





DATA LIST FILE="C:\Documents and Settings\Administrator\My
Documents\AONE_study\SIDC_ME_02\ME_SID_2002_CORE.asc" FIXED /

 KEY                   1-  14

 ADRG                 15-  17

 AGE                  18-  20

 AGEDAY               21-  23

 AGEMONTH             24-  26







Output error message:



>Error # 31 in column 16.  Text: C:\Documents and Settings\Administrator\My

>File not found.

>This command not executed.





Thanks, John - MUSC, Charleston SC
Reply | Threaded
Open this post in threaded view
|

Re: DATA LIST question

Richard Ristow
At 12:44 AM 3/15/2007, John wrote:

>I can't seem to figure out why this is not working (the space in My
>Documents folder?)
>
>DATA LIST FILE="C:\Documents and Settings\Administrator\My
>Documents\AONE_study\SIDC_ME_02\ME_SID_2002_CORE.asc" FIXED /
>  KEY                   1-  14
>  ADRG                 15-  17
>  AGE                  18-  20
>  AGEDAY               21-  23
>  AGEMONTH             24-  26
>
>Output error message:
>
> >Error # 31 in column 16.  Text: C:\Documents and
> Settings\Administrator\My
> >File not found.

The clue is that what it's looking for and not finding is,
"C:\Documents and Settings\Administrator\My"

That is, it's seeing your text up to where the line wraps.

SPSS character literals can't be continued across lines directly; but
closing the literal, appending '+', and continuing it on the next line,
works. Try this. (I'm breaking just before a '\'; and moving 'FIXED' to
a line by itself. Aesthetics, aesthetics...

DATA LIST
    FILE="C:\Documents and Settings\Administrator" +
           "\My Documents\AONE_study"              +
           "\SIDC_ME_02\ME_SID_2002_CORE.asc"
    FIXED /
    KEY                   1-  14
    ADRG                 15-  17
    AGE                  18-  20
    AGEDAY               21-  23
    AGEMONTH             24-  26