continue syntax line

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

continue syntax line

Rodrigo Briceño-2
Dear SPSS users. I have a very long syntax that I need to run. However I don't know how to tell SPSS to break lines. Do anybody can give me a hint on this please?

Thanks for your help.


GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A S2P2 S2P3 S2P4 S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A S5P11B S5P12 S5P13 S5P14 S5P15A S5P15B
    S5P16A S5P16B S5P17 S5P18 S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B S5P24A S5P24B S5P25A S5P25B S5P26A
    5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A S5P29B S5P30 S5P31A S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43 S5P44A S5P44B S5P45A S5P45B S5P46A
    S5P46B S5P47 S5P48 S5P49 S5P50A S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A S5P63B S5P63C S5P64A S5P64B S5P65A
    S5P65B S5P66 S5P67A S5P67B S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A S5P70B S5P71A S5P71B S5P72 S5P73A S5P73B.


--
Rodrigo Briceño
Economist
SKYPE: rbriceno1087
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: continue syntax line

Bruce Weaver
Administrator
Just hit ENTER where you want to end a line.  E.g.,

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A
    S2P2 S2P3 S2P4 S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A
    S5P11B S5P12 S5P13 S5P14 S5P15A S5P15B S5P16A S5P16B S5P17 S5P18
    S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B S5P24A S5P24B S5P25A
    S5P25B S5P26A 5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A
    S5P29B S5P30 S5P31A S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
    S5P44A S5P44B S5P45A S5P45B S5P46A S5P46B S5P47 S5P48 S5P49 S5P50A
    S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
    S5P63B S5P63C S5P64A S5P64B S5P65A S5P65B S5P66 S5P67A S5P67B
    S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A S5P70B S5P71A S5P71B
    S5P72 S5P73A S5P73B.

Also, note that if any of these variables are contiguous in the file, you can use the keyword TO.  E.g., if all of them were contiguous and in order, you could shorten that to:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A TO S5P73B.

Or, you can have multiple sets of contiguous variables, like this:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = A1 TO A5 B3 TO B7 C2 to C8.

HTH.


Rodrigo Briceño-2 wrote
Dear SPSS users. I have a very long syntax that I need to run. However I
don't know how to tell SPSS to break lines. Do anybody can give me a hint
on this please?

Thanks for your help.


GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A S2P2 S2P3 S2P4
S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A S5P11B
S5P12 S5P13 S5P14 S5P15A S5P15B
    S5P16A S5P16B S5P17 S5P18 S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B
S5P24A S5P24B S5P25A S5P25B S5P26A
    5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A S5P29B S5P30 S5P31A
S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
S5P44A S5P44B S5P45A S5P45B S5P46A
    S5P46B S5P47 S5P48 S5P49 S5P50A S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A
S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
S5P63B S5P63C S5P64A S5P64B S5P65A
    S5P65B S5P66 S5P67A S5P67B S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A
S5P70B S5P71A S5P71B S5P72 S5P73A S5P73B.


--
Rodrigo Briceño
Economist
[hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: continue syntax line

David Marso
Administrator
Additionally, GET FILE supports a /DROP subcommand.
--
Bruce Weaver wrote
Just hit ENTER where you want to end a line.  E.g.,

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A
    S2P2 S2P3 S2P4 S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A
    S5P11B S5P12 S5P13 S5P14 S5P15A S5P15B S5P16A S5P16B S5P17 S5P18
    S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B S5P24A S5P24B S5P25A
    S5P25B S5P26A 5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A
    S5P29B S5P30 S5P31A S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
    S5P44A S5P44B S5P45A S5P45B S5P46A S5P46B S5P47 S5P48 S5P49 S5P50A
    S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
    S5P63B S5P63C S5P64A S5P64B S5P65A S5P65B S5P66 S5P67A S5P67B
    S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A S5P70B S5P71A S5P71B
    S5P72 S5P73A S5P73B.

Also, note that if any of these variables are contiguous in the file, you can use the keyword TO.  E.g., if all of them were contiguous and in order, you could shorten that to:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A TO S5P73B.

Or, you can have multiple sets of contiguous variables, like this:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = A1 TO A5 B3 TO B7 C2 to C8.

HTH.


Rodrigo Briceño-2 wrote
Dear SPSS users. I have a very long syntax that I need to run. However I
don't know how to tell SPSS to break lines. Do anybody can give me a hint
on this please?

Thanks for your help.


GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A S2P2 S2P3 S2P4
S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A S5P11B
S5P12 S5P13 S5P14 S5P15A S5P15B
    S5P16A S5P16B S5P17 S5P18 S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B
S5P24A S5P24B S5P25A S5P25B S5P26A
    5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A S5P29B S5P30 S5P31A
S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
S5P44A S5P44B S5P45A S5P45B S5P46A
    S5P46B S5P47 S5P48 S5P49 S5P50A S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A
S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
S5P63B S5P63C S5P64A S5P64B S5P65A
    S5P65B S5P66 S5P67A S5P67B S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A
S5P70B S5P71A S5P71B S5P72 S5P73A S5P73B.


--
Rodrigo Briceño
Economist
[hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: continue syntax line

Bruce Weaver
Administrator
Good point!  

p.s. - Folks who use SPSS only may have found the original question a bit curious.  But note that in some other environments, one may need to explicitly signal that a command is continuing on the next line.  E.g., in Stata DO files, '///' at the end of a line is the line continuation marker.  


David Marso wrote
Additionally, GET FILE supports a /DROP subcommand.
--
Bruce Weaver wrote
Just hit ENTER where you want to end a line.  E.g.,

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A
    S2P2 S2P3 S2P4 S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A
    S5P11B S5P12 S5P13 S5P14 S5P15A S5P15B S5P16A S5P16B S5P17 S5P18
    S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B S5P24A S5P24B S5P25A
    S5P25B S5P26A 5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A
    S5P29B S5P30 S5P31A S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
    S5P44A S5P44B S5P45A S5P45B S5P46A S5P46B S5P47 S5P48 S5P49 S5P50A
    S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
    S5P63B S5P63C S5P64A S5P64B S5P65A S5P65B S5P66 S5P67A S5P67B
    S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A S5P70B S5P71A S5P71B
    S5P72 S5P73A S5P73B.

Also, note that if any of these variables are contiguous in the file, you can use the keyword TO.  E.g., if all of them were contiguous and in order, you could shorten that to:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A TO S5P73B.

Or, you can have multiple sets of contiguous variables, like this:

GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = A1 TO A5 B3 TO B7 C2 to C8.

HTH.


Rodrigo Briceño-2 wrote
Dear SPSS users. I have a very long syntax that I need to run. However I
don't know how to tell SPSS to break lines. Do anybody can give me a hint
on this please?

Thanks for your help.


GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
   /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A S2P2 S2P3 S2P4
S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
    S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A S5P11B
S5P12 S5P13 S5P14 S5P15A S5P15B
    S5P16A S5P16B S5P17 S5P18 S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B
S5P24A S5P24B S5P25A S5P25B S5P26A
    5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A S5P29B S5P30 S5P31A
S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
    S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
S5P44A S5P44B S5P45A S5P45B S5P46A
    S5P46B S5P47 S5P48 S5P49 S5P50A S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A
S5P55B S5P56A S5P56B S5P57
    S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
S5P63B S5P63C S5P64A S5P64B S5P65A
    S5P65B S5P66 S5P67A S5P67B S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A
S5P70B S5P71A S5P71B S5P72 S5P73A S5P73B.


--
Rodrigo Briceño
Economist
[hidden email]
SKYPE: rbriceno1087

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: continue syntax line

Rodrigo Briceño-2
thanks to all of you for your help!

2015-01-22 7:11 GMT-06:00 Bruce Weaver <[hidden email]>:
Good point!

p.s. - Folks who use SPSS only may have found the original question a bit
curious.  But note that in some other environments, one may need to
explicitly signal that a command is continuing on the next line.  E.g., in
Stata DO files, '///' at the end of a line is the line continuation marker.



David Marso wrote
> Additionally, GET FILE supports a /DROP subcommand.
> --
> Bruce Weaver wrote
>> Just hit ENTER where you want to end a line.  E.g.,
>>
>> GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
>>    /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A
>>     S2P2 S2P3 S2P4 S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
>>     S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A
>>     S5P11B S5P12 S5P13 S5P14 S5P15A S5P15B S5P16A S5P16B S5P17 S5P18
>>     S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A S5P23B S5P24A S5P24B S5P25A
>>     S5P25B S5P26A 5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A
>>     S5P29B S5P30 S5P31A S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
>>     S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
>>     S5P44A S5P44B S5P45A S5P45B S5P46A S5P46B S5P47 S5P48 S5P49 S5P50A
>>     S5P50B S5P51 S5P52 S5P53 S5P54 S5P55A S5P55B S5P56A S5P56B S5P57
>>     S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
>>     S5P63B S5P63C S5P64A S5P64B S5P65A S5P65B S5P66 S5P67A S5P67B
>>     S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A S5P70B S5P71A S5P71B
>>     S5P72 S5P73A S5P73B.
>>
>> Also, note that if any of these variables are contiguous in the file, you
>> can use the keyword TO.  E.g., if all of them were contiguous and in
>> order, you could shorten that to:
>>
>> GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
>>    /KEEP = I00A TO S5P73B.
>>
>> Or, you can have multiple sets of contiguous variables, like this:
>>
>> GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
>>    /KEEP = A1 TO A5 B3 TO B7 C2 to C8.
>>
>> HTH.
>>
>> Rodrigo Briceño-2 wrote
>>> Dear SPSS users. I have a very long syntax that I need to run. However I
>>> don't know how to tell SPSS to break lines. Do anybody can give me a
>>> hint
>>> on this please?
>>>
>>> Thanks for your help.
>>>
>>>
>>> GET FILE='D:\MECOVI\EMNV2001\DATOS\POBLAC.SAV'
>>>    /KEEP = I00A I00B S2P00 I01 I02 I03 I04 I05 I06 I06A S2P2 S2P3 S2P4
>>> S2P5A S2P5B S2P5C S2P6 S2P7 S2P11 S5P00 S5CP
>>>     S5P1 S5P2 S5P3 S5P4A S5P4B S5P5 S5P6 S5P7 S5P8 S5P9 S5P10 S5P11A
>>> S5P11B
>>> S5P12 S5P13 S5P14 S5P15A S5P15B
>>>     S5P16A S5P16B S5P17 S5P18 S5P19 S5P20A S5P20B S5P21 S5P22 S5P23A
>>> S5P23B
>>> S5P24A S5P24B S5P25A S5P25B S5P26A
>>>     5P26B S5P27A S5P27B S5P27C S5P28A S5P28B S5P29A S5P29B S5P30 S5P31A
>>> S5P31B S5P32 S5P33A S5P33B S5P34 S5P35 S5P36
>>>     S5P37A S5P37B S5P38A S5P38B S5P39 S5P40 S5P41A S5P41B S5P42 S5P43
>>> S5P44A S5P44B S5P45A S5P45B S5P46A
>>>     S5P46B S5P47 S5P48 S5P49 S5P50A S5P50B S5P51 S5P52 S5P53 S5P54
>>> S5P55A
>>> S5P55B S5P56A S5P56B S5P57
>>>     S5P58 S5P59A S5P59B S5P59C S5P60 S5P61 S5P62A S5P62B 5P62C S5P63A
>>> S5P63B S5P63C S5P64A S5P64B S5P65A
>>>     S5P65B S5P66 S5P67A S5P67B S5P68A S5P68B S5P69A S5P69B S5P69C S5P70A
>>> S5P70B S5P71A S5P71B S5P72 S5P73A S5P73B.
>>>
>>>
>>> --
>>> Rodrigo Briceño
>>> Economist

>>> rjbriceno@

>>> SKYPE: rbriceno1087
>>>
>>> =====================
>>> To manage your subscription to SPSSX-L, send a message to

>>> LISTSERV@.UGA

>>>  (not to SPSSX-L), with no body text except the
>>> command. To leave the list, send the command
>>> SIGNOFF SPSSX-L
>>> For a list of commands to manage subscriptions, send the command
>>> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/continue-syntax-line-tp5728453p5728456.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Rodrigo Briceño
Economist
SKYPE: rbriceno1087
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD