SELECT IF LOOP

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

SELECT IF LOOP

shasj
Hi Dears

How do I create a loop that gives several other data.frames through a variable

e.g

TEMPORARY.
SELECT IF (VAR   EQ "4206").
SAVE TRANSLATE OUTFILE ="4206_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.

Where VAR is one variable of my database and 4206 is string valor of the VAR.

My variable may have several outhers values.

How I do one loop for this?

Thanks

--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

David Marso
Administrator
DEFINE - !ENDDEFINE
!DO -!DOEND
!QUOTE
--
shasj wrote
Hi Dears

How do I create a loop that gives several other data.frames through a
variable

e.g

TEMPORARY.
SELECT IF (VAR   EQ "4206").
SAVE TRANSLATE OUTFILE ="4206_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.

Where VAR is one variable of my database and 4206 is string valor of the
VAR.

My variable may have several outhers values.

How I do one loop for this?

Thanks

--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
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: SELECT IF LOOP

Bruce Weaver
Administrator
In reply to this post by shasj
See my reply to your post at comp.soft-sys.stat.spss.

  https://groups.google.com/forum/#!topic/comp.soft-sys.stat.spss/smOsVOyAKfM


shasj wrote
Hi Dears

How do I create a loop that gives several other data.frames through a
variable

e.g

TEMPORARY.
SELECT IF (VAR   EQ "4206").
SAVE TRANSLATE OUTFILE ="4206_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.

Where VAR is one variable of my database and 4206 is string valor of the
VAR.

My variable may have several outhers values.

How I do one loop for this?

Thanks

--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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: SELECT IF LOOP

shasj
Thanks

I guess I was not clear. I need split my data.frame for one variable (codigo)

e.g

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

TEMPORARY.
SELECT IF (codigo EQ "10001").
SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.  


I do it for each value of the variable codigo (may I several values), but I'd like run one macro that I do it only once.  

Thanks!!!
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

David Marso
Administrator
What part of Bruce's post doesn't cut the mustard?
shasj wrote
Thanks

I guess I was not clear. I need split my data.frame for one variable (codigo)

e.g

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

TEMPORARY.
SELECT IF (codigo EQ "10001").
SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.  


I do it for each value of the variable codigo (may I several values), but I'd like run one macro that I do it only once.  

Thanks!!!
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: SELECT IF LOOP

shasj
I don´t understand very well what you say!

But in the  Bruce's post I understand that I say for my macro the values of the my variable.

STLoop Vlist = "4206" "4207".

Not?
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

David Marso
Administrator
Maybe a quick peek at the FM (fine manual) might illuminate?
Or some strong coffee, a cold shower or more sleep?
--
shasj wrote
I don´t understand very well what you say!

But in the  Bruce's post I understand that I say for my macro the values of the my variable.

STLoop Vlist = "4206" "4207".

Not?
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: SELECT IF LOOP

shasj
Dear David Marso

The Bruce's post run fine. But I have to say for what values for split

see exemple below.

I do it easily in the R software, but I need to do in SPSS too.

Thanks for your help!

!DO !V !IN(!Vlist) 
!LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS")) 
TEMPORARY. 
SELECT IF (VAR EQ !V). 
SAVE TRANSLATE OUTFILE = !F /TYPE =XLS 
  /VERSION=8 
  /REPLACE 
  /FIELDNAMES. 

!DOEND 

!ENDDEFINE. 


SET mprint on. 
STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273" "2628" "3211" "3291". 
SET mprint off. 



2013/6/24 David Marso [via SPSSX Discussion] <[hidden email]>
Maybe a quick peek at the FM (fine manual) might illuminate?
Or some strong coffee, a cold shower or more sleep?
--
shasj wrote
I don´t understand very well what you say!

But in the  Bruce's post I understand that I say for my macro the values of the my variable.

STLoop Vlist = "4206" "4207".

Not?
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?"



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Bruce Weaver
Administrator
It might help if we include here your most recent post to the usenet newsgroup.  (This mailing list is far more active these days than the newsgroup.)  Here it is.

--- shasj's post to comp.soft-sys.stat.spss ---

I guess I was not clear. I need split my data.frame for one variable (codigo)

e.g

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

TEMPORARY.
SELECT IF (codigo EQ "10001").
SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.  


I do it for each value of the variable codigo (may I several values), but I'd like run one macro that I do it only once.  



shasj wrote
Dear David Marso

The Bruce's post run fine. But I have to say for what values for split

see exemple below.

I do it easily in the R software, but I need to do in SPSS too.

Thanks for your help!

!DO !V !IN(!Vlist)
!LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
TEMPORARY.
SELECT IF (VAR EQ !V).
SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
  /VERSION=8
  /REPLACE
  /FIELDNAMES.

!DOEND

!ENDDEFINE.


SET mprint on.
STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
"2628" "3211" "3291".
SET mprint off.



2013/6/24 David Marso [via SPSSX Discussion] <
[hidden email]>

> Maybe a quick peek at the FM (fine manual) might illuminate?
> Or some strong coffee, a cold shower or more sleep?
> --
>
> shasj wrote
> I don´t understand very well what you say!
>
> But in the  Bruce's post I understand that I say for my macro the values
> of the my variable.
>
> STLoop Vlist = "4206" "4207".
>
> Not?
>
>  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?"
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
>  To unsubscribe from SELECT IF LOOP, click here<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
> .
> NAML<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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: SELECT IF LOOP

shasj
All possible value of Var!


2013/6/24 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
It might help if we include here your most recent post to the usenet newsgroup.  (This mailing list is far more active these days than the newsgroup.)  Here it is.

--- shasj's post to comp.soft-sys.stat.spss ---

I guess I was not clear. I need split my data.frame for one variable (codigo)

e.g

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

TEMPORARY.
SELECT IF (codigo EQ "10001").
SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
/VERSION=8
/REPLACE
/FIELDNAMES.  


I do it for each value of the variable codigo (may I several values), but I'd like run one macro that I do it only once.  



shasj wrote
Dear David Marso

The Bruce's post run fine. But I have to say for what values for split

see exemple below.

I do it easily in the R software, but I need to do in SPSS too.

Thanks for your help!

!DO !V !IN(!Vlist)
!LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
TEMPORARY.
SELECT IF (VAR EQ !V).
SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
  /VERSION=8
  /REPLACE
  /FIELDNAMES.

!DOEND

!ENDDEFINE.


SET mprint on.
STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
"2628" "3211" "3291".
SET mprint off.



2013/6/24 David Marso [via SPSSX Discussion] <
[hidden email]>

> Maybe a quick peek at the FM (fine manual) might illuminate?
> Or some strong coffee, a cold shower or more sleep?
> --
>
> shasj wrote
> I don´t understand very well what you say!
>
> But in the  Bruce's post I understand that I say for my macro the values
> of the my variable.
>
> STLoop Vlist = "4206" "4207".
>
> Not?
>
>  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?"
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Bruce Weaver
Administrator
This can probably be done via Python.  But you could also use a native SPSS approach that some list members describe as a "horrible hack".  ;-)

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age(F2.0) sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

SORT CASES by codigo.
MATCH FILES file = * / BY codigo / FIRST = FirstRec.
EXECUTE.

* Write commands to a syntax file.

DO IF FirstRec.
- WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
 "TEMPORARY." /
 "SELECT IF (codigo EQ ","'",codigo"'",")." /
 "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS /VERSION=8/REPLACE/FIELDNAMES.".
END IF.
EXECUTE.

* Now insert that syntax file.

INSERT FILE = "C:\TEMP\HorribleHack.SPS".

* Clean up the junk .

ERASE FILE = "C:\TEMP\HorribleHack.SPS".

* ---------------------------------------------- .

Contents of the resulting Excel files are:

codigo age sex FirstRec
10001 10 F 1
10001 20 M 0

codigo age sex FirstRec
10002 25 M 1
10002 24 F 0

codigo age sex FirstRec
10005 32 F 1
10005 30 M 0

codigo age sex FirstRec
10007 14 M 1
10007 16 F 0
10007 18 M 0

HTH.


shasj wrote
All possible value of Var!


2013/6/24 Bruce Weaver [via SPSSX Discussion] <
[hidden email]>

> It might help if we include here your most recent post to the usenet
> newsgroup.  (This mailing list is far more active these days than the
> newsgroup.)  Here it is.
>
> *--- shasj's post to comp.soft-sys.stat.spss ---*
>
> I guess I was not clear. I need split my data.frame for one variable
> (codigo)
>
> e.g
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
>  codigo (A5)  age sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20  "M"
> "10002" 25  "M"
> "10002" 24  "F"
> "10005" 32  "F"
> "10005" 30  "M"
> "10007" 14  "M"
> "10007" 16  "F"
> "10007" 18  "M"
> END DATA.
>
> TEMPORARY.
> SELECT IF (codigo EQ "10001").
> SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> /VERSION=8
> /REPLACE
> /FIELDNAMES.
>
>
> I do it for each value of the variable codigo (may I several values), but
> I'd like run one macro that I do it only once.
>
>
>
> shasj wrote
> Dear David Marso
>
> The Bruce's post run fine. But I have to say for what values for split
>
> see exemple below.
>
> I do it easily in the R software, but I need to do in SPSS too.
>
> Thanks for your help!
>
> !DO !V !IN(!Vlist)
> !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> TEMPORARY.
> SELECT IF (VAR EQ !V).
> SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
>   /VERSION=8
>   /REPLACE
>   /FIELDNAMES.
>
> !DOEND
>
> !ENDDEFINE.
>
>
> SET mprint on.
> STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
> "2628" "3211" "3291".
> SET mprint off.
>
>
>
> 2013/6/24 David Marso [via SPSSX Discussion] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720871&i=0>>
>
> > Maybe a quick peek at the FM (fine manual) might illuminate?
> > Or some strong coffee, a cold shower or more sleep?
> > --
> >
> > shasj wrote
> > I don´t understand very well what you say!
> >
> > But in the  Bruce's post I understand that I say for my macro the values
> > of the my variable.
> >
> > STLoop Vlist = "4206" "4207".
> >
> > Not?
> >
> >  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?"
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> >  To unsubscribe from SELECT IF LOOP, click here<
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
> > .
> > NAML<
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
> >
>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> http://lattes.cnpq.br/1611345552843383
> Tel: (21) 68463637
> http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
>  --
> 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.
> *
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
>  To unsubscribe from SELECT IF LOOP, click here<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
> .
> NAML<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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: SELECT IF LOOP

shasj
Fine!

Thanks very much!


2013/6/25 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
This can probably be done via Python.  But you could also use a native SPSS approach that some list members describe as a "horrible hack".  ;-)

NEW FILE.
DATASET CLOSE all.
DATA LIST FREE /
 codigo (A5)  age(F2.0) sex(A1).
BEGIN DATA.
"10001" 10 "F"
"10001" 20  "M"
"10002" 25  "M"
"10002" 24  "F"
"10005" 32  "F"
"10005" 30  "M"
"10007" 14  "M"
"10007" 16  "F"
"10007" 18  "M"
END DATA.

SORT CASES by codigo.
MATCH FILES file = * / BY codigo / FIRST = FirstRec.
EXECUTE.

* Write commands to a syntax file.

DO IF FirstRec.
- WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
 "TEMPORARY." /
 "SELECT IF (codigo EQ ","'",codigo"'",")." /
 "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS /VERSION=8/REPLACE/FIELDNAMES.".
END IF.
EXECUTE.

* Now insert that syntax file.

INSERT FILE = "C:\TEMP\HorribleHack.SPS".

* Clean up the junk .

ERASE FILE = "C:\TEMP\HorribleHack.SPS".

* ---------------------------------------------- .

Contents of the resulting Excel files are:

codigo age sex FirstRec
10001 10 F 1
10001 20 M 0

codigo age sex FirstRec
10002 25 M 1
10002 24 F 0

codigo age sex FirstRec
10005 32 F 1
10005 30 M 0

codigo age sex FirstRec
10007 14 M 1
10007 16 F 0
10007 18 M 0

HTH.


shasj wrote
All possible value of Var!


2013/6/24 Bruce Weaver [via SPSSX Discussion] <
[hidden email]>

> It might help if we include here your most recent post to the usenet
> newsgroup.  (This mailing list is far more active these days than the
> newsgroup.)  Here it is.
>
> *--- shasj's post to comp.soft-sys.stat.spss ---*
>

> I guess I was not clear. I need split my data.frame for one variable
> (codigo)
>
> e.g
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
>  codigo (A5)  age sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20  "M"
> "10002" 25  "M"
> "10002" 24  "F"
> "10005" 32  "F"
> "10005" 30  "M"
> "10007" 14  "M"
> "10007" 16  "F"
> "10007" 18  "M"
> END DATA.
>
> TEMPORARY.
> SELECT IF (codigo EQ "10001").
> SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> /VERSION=8
> /REPLACE
> /FIELDNAMES.
>
>
> I do it for each value of the variable codigo (may I several values), but
> I'd like run one macro that I do it only once.
>
>
>
> shasj wrote
> Dear David Marso
>
> The Bruce's post run fine. But I have to say for what values for split
>
> see exemple below.
>
> I do it easily in the R software, but I need to do in SPSS too.
>
> Thanks for your help!
>
> !DO !V !IN(!Vlist)
> !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> TEMPORARY.
> SELECT IF (VAR EQ !V).
> SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
>   /VERSION=8
>   /REPLACE
>   /FIELDNAMES.
>
> !DOEND
>
> !ENDDEFINE.
>
>
> SET mprint on.
> STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
> "2628" "3211" "3291".
> SET mprint off.
>
>
>
> 2013/6/24 David Marso [via SPSSX Discussion] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720871&i=0>>
>

> > Maybe a quick peek at the FM (fine manual) might illuminate?
> > Or some strong coffee, a cold shower or more sleep?
> > --
> >
> > shasj wrote
> > I don´t understand very well what you say!
> >
> > But in the  Bruce's post I understand that I say for my macro the values
> > of the my variable.
> >
> > STLoop Vlist = "4206" "4207".
> >
> > Not?
> >
> >  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?"
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> >  To unsubscribe from SELECT IF LOOP, click here<
>
> > .
> > NAML<
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>

> >
>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> http://lattes.cnpq.br/1611345552843383
> Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
>  --
> 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.
> *
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
--
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.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720886.html
To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Bruce Weaver
Administrator
If you don't want all of the stuff in HorribleHack.SPS echoed in your output window, you could add some SET commands, like this:

SET PRINTBACK = OFF. /* Suppress output.
INSERT FILE = "C:\TEMP\HorribleHack.SPS".
SET PRINTBACK = ON. /* Turn output back on.


shasj wrote
Fine!

Thanks very much!


2013/6/25 Bruce Weaver [via SPSSX Discussion] <
[hidden email]>

> This can probably be done via Python.  But you could also use a native
> SPSS approach that some list members describe as a "horrible hack".  ;-)
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
>  codigo (A5)  age(F2.0) sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20  "M"
> "10002" 25  "M"
> "10002" 24  "F"
> "10005" 32  "F"
> "10005" 30  "M"
> "10007" 14  "M"
> "10007" 16  "F"
> "10007" 18  "M"
> END DATA.
>
> SORT CASES by codigo.
> MATCH FILES file = * / BY codigo / FIRST = FirstRec.
> EXECUTE.
>
> * Write commands to a syntax file.
>
> DO IF FirstRec.
> - WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
>  "TEMPORARY." /
>  "SELECT IF (codigo EQ ","'",codigo"'",")." /
>  "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS
> /VERSION=8/REPLACE/FIELDNAMES.".
> END IF.
> EXECUTE.
>
> * Now insert that syntax file.
>
> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
>
> * Clean up the junk .
>
> ERASE FILE = "C:\TEMP\HorribleHack.SPS".
>
> * ---------------------------------------------- .
>
> Contents of the resulting Excel files are:
>
> codigo age sex FirstRec
> 10001 10 F 1
> 10001 20 M 0
>
> codigo age sex FirstRec
> 10002 25 M 1
> 10002 24 F 0
>
> codigo age sex FirstRec
> 10005 32 F 1
> 10005 30 M 0
>
> codigo age sex FirstRec
> 10007 14 M 1
> 10007 16 F 0
> 10007 18 M 0
>
> HTH.
>
>
> shasj wrote
> All possible value of Var!
>
>
> 2013/6/24 Bruce Weaver [via SPSSX Discussion] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=0>>
>
> > It might help if we include here your most recent post to the usenet
> > newsgroup.  (This mailing list is far more active these days than the
> > newsgroup.)  Here it is.
> >
> > *--- shasj's post to comp.soft-sys.stat.spss ---*
> >
> > I guess I was not clear. I need split my data.frame for one variable
> > (codigo)
> >
> > e.g
> >
> > NEW FILE.
> > DATASET CLOSE all.
> > DATA LIST FREE /
> >  codigo (A5)  age sex(A1).
> > BEGIN DATA.
> > "10001" 10 "F"
> > "10001" 20  "M"
> > "10002" 25  "M"
> > "10002" 24  "F"
> > "10005" 32  "F"
> > "10005" 30  "M"
> > "10007" 14  "M"
> > "10007" 16  "F"
> > "10007" 18  "M"
> > END DATA.
> >
> > TEMPORARY.
> > SELECT IF (codigo EQ "10001").
> > SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> > /VERSION=8
> > /REPLACE
> > /FIELDNAMES.
> >
> >
> > I do it for each value of the variable codigo (may I several values),
> but
> > I'd like run one macro that I do it only once.
> >
> >
> >
> > shasj wrote
> > Dear David Marso
> >
> > The Bruce's post run fine. But I have to say for what values for split
> >
> > see exemple below.
> >
> > I do it easily in the R software, but I need to do in SPSS too.
> >
> > Thanks for your help!
> >
> > !DO !V !IN(!Vlist)
> > !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> > TEMPORARY.
> > SELECT IF (VAR EQ !V).
> > SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
> >   /VERSION=8
> >   /REPLACE
> >   /FIELDNAMES.
> >
> > !DOEND
> >
> > !ENDDEFINE.
> >
> >
> > SET mprint on.
> > STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
> > "2628" "3211" "3291".
> > SET mprint off.
> >
> >
> >
> > 2013/6/24 David Marso [via SPSSX Discussion] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720871&i=0>>
> >
> > > Maybe a quick peek at the FM (fine manual) might illuminate?
> > > Or some strong coffee, a cold shower or more sleep?
> > > --
> > >
> > > shasj wrote
> > > I don´t understand very well what you say!
> > >
> > > But in the  Bruce's post I understand that I say for my macro the
> values
> > > of the my variable.
> > >
> > > STLoop Vlist = "4206" "4207".
> > >
> > > Not?
> > >
> > >  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?"
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> > discussion
> > > below:
> > >
> > >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> > >  To unsubscribe from SELECT IF LOOP, click here<
> >
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
>
> > > .
> > > NAML<
> >
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> ><
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E%3E>
>
> > >
> >
> >
> >
> > --
> > Sérgio Henrique Almeida da Silva Junior
> > Doutorando em Epidemiologia em Saúde Pública
> > Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> > http://lattes.cnpq.br/1611345552843383
> > Tel: (21) 68463637
> > http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
> >
> >  --
> > Bruce Weaver
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=1>
>
> > 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.
> > *
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
> >  To unsubscribe from SELECT IF LOOP, click here<
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
> > .
> > NAML<
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
> >
>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> http://lattes.cnpq.br/1611345552843383
> Tel: (21) 68463637
> http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
>  --
> 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.
> *
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720886.html
>  To unsubscribe from SELECT IF LOOP, click here<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5720860&code=c2VyZ2lvLmVkZmlzaWNhQGdtYWlsLmNvbXw1NzIwODYwfDk1MDA4MzI4NA==>
> .
> NAML<http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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
|

Automatic reply: SELECT IF LOOP

Matthew Fuller-Tyszkiewicz
Hi,

Hi,

I'm away on leave, and will return to work on August 1st. I will not have regular access to my email account while away, and will endeavour to return your emails shortly after my return.

If you have urgent queries regarding T1 HPS301/781, please contact Dr Melissa Weinberg (melissaw@...)

Cheers,
Matt.

Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

shasj
In reply to this post by Bruce Weaver
Thanks again!

I install the python plugin in SPSS and run the script

SPSSINC SPLIT DATASET SPLITVAR=VAR
/OUTPUT DIRECTORY= DELETECONTENTS=NO 
/OPTIONS NAMES=VALUES PRINTLIST=YES.

but it save my data.frame in *SAV and I need save it in XLS.



2013/6/26 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
If you don't want all of the stuff in HorribleHack.SPS echoed in your output window, you could add some SET commands, like this:

SET PRINTBACK = OFF. /* Suppress output.

INSERT FILE = "C:\TEMP\HorribleHack.SPS".
SET PRINTBACK = ON. /* Turn output back on.


shasj wrote
Fine!

Thanks very much!


2013/6/25 Bruce Weaver [via SPSSX Discussion] <
[hidden email]>

> This can probably be done via Python.  But you could also use a native
> SPSS approach that some list members describe as a "horrible hack".  ;-)
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
>  codigo (A5)  age(F2.0) sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20  "M"
> "10002" 25  "M"
> "10002" 24  "F"
> "10005" 32  "F"
> "10005" 30  "M"
> "10007" 14  "M"
> "10007" 16  "F"
> "10007" 18  "M"
> END DATA.
>
> SORT CASES by codigo.
> MATCH FILES file = * / BY codigo / FIRST = FirstRec.
> EXECUTE.
>
> * Write commands to a syntax file.
>
> DO IF FirstRec.
> - WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
>  "TEMPORARY." /
>  "SELECT IF (codigo EQ ","'",codigo"'",")." /
>  "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS
> /VERSION=8/REPLACE/FIELDNAMES.".
> END IF.
> EXECUTE.
>
> * Now insert that syntax file.
>
> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
>
> * Clean up the junk .
>
> ERASE FILE = "C:\TEMP\HorribleHack.SPS".
>
> * ---------------------------------------------- .
>
> Contents of the resulting Excel files are:
>
> codigo age sex FirstRec
> 10001 10 F 1
> 10001 20 M 0
>
> codigo age sex FirstRec
> 10002 25 M 1
> 10002 24 F 0
>
> codigo age sex FirstRec
> 10005 32 F 1
> 10005 30 M 0
>
> codigo age sex FirstRec
> 10007 14 M 1
> 10007 16 F 0
> 10007 18 M 0
>
> HTH.
>
>
> shasj wrote
> All possible value of Var!
>
>
> 2013/6/24 Bruce Weaver [via SPSSX Discussion] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=0>>
>

> > It might help if we include here your most recent post to the usenet
> > newsgroup.  (This mailing list is far more active these days than the
> > newsgroup.)  Here it is.
> >
> > *--- shasj's post to comp.soft-sys.stat.spss ---*
> >
> > I guess I was not clear. I need split my data.frame for one variable
> > (codigo)
> >
> > e.g
> >
> > NEW FILE.
> > DATASET CLOSE all.
> > DATA LIST FREE /
> >  codigo (A5)  age sex(A1).
> > BEGIN DATA.
> > "10001" 10 "F"
> > "10001" 20  "M"
> > "10002" 25  "M"
> > "10002" 24  "F"
> > "10005" 32  "F"
> > "10005" 30  "M"
> > "10007" 14  "M"
> > "10007" 16  "F"
> > "10007" 18  "M"
> > END DATA.
> >
> > TEMPORARY.
> > SELECT IF (codigo EQ "10001").
> > SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> > /VERSION=8
> > /REPLACE
> > /FIELDNAMES.
> >
> >
> > I do it for each value of the variable codigo (may I several values),
> but
> > I'd like run one macro that I do it only once.
> >
> >
> >
> > shasj wrote
> > Dear David Marso
> >
> > The Bruce's post run fine. But I have to say for what values for split
> >
> > see exemple below.
> >
> > I do it easily in the R software, but I need to do in SPSS too.
> >
> > Thanks for your help!
> >
> > !DO !V !IN(!Vlist)
> > !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> > TEMPORARY.
> > SELECT IF (VAR EQ !V).
> > SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
> >   /VERSION=8
> >   /REPLACE
> >   /FIELDNAMES.
> >
> > !DOEND
> >
> > !ENDDEFINE.
> >
> >
> > SET mprint on.
> > STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
> > "2628" "3211" "3291".
> > SET mprint off.
> >
> >
> >
> > 2013/6/24 David Marso [via SPSSX Discussion] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720871&i=0>>
> >
> > > Maybe a quick peek at the FM (fine manual) might illuminate?
> > > Or some strong coffee, a cold shower or more sleep?
> > > --
> > >
> > > shasj wrote
> > > I don´t understand very well what you say!
> > >
> > > But in the  Bruce's post I understand that I say for my macro the
> values
> > > of the my variable.
> > >
> > > STLoop Vlist = "4206" "4207".
> > >
> > > Not?
> > >
> > >  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?"
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> > discussion
> > > below:
> > >
> > >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> > >  To unsubscribe from SELECT IF LOOP, click here<
> >
>
>
> > > .
> > > NAML<
> >
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> ><
> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E%3E>

>
> > >
> >
> >
> >
> > --
> > Sérgio Henrique Almeida da Silva Junior
> > Doutorando em Epidemiologia em Saúde Pública
> > Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> > http://lattes.cnpq.br/1611345552843383
> > Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> > http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
> >
> >  --
> > Bruce Weaver
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=1>

>
> > 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.
> > *
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
> >  To unsubscribe from SELECT IF LOOP, click here<
>
> > .
> > NAML<
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
> >

>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> http://lattes.cnpq.br/1611345552843383
> Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
>  --
> 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.
> *
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
--
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.



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720896.html
To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Jon K Peck
I posted an answer to this on another site where you duplicated this post.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        shasj <[hidden email]>
To:        [hidden email],
Date:        06/26/2013 04:46 PM
Subject:        Re: [SPSSX-L] SELECT IF LOOP
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Thanks again!

I install the python plugin in SPSS and run the script

SPSSINC SPLIT DATASET SPLITVAR=VAR
/OUTPUT DIRECTORY= DELETECONTENTS=NO 
/OPTIONS NAMES=VALUES PRINTLIST=YES.

but it save my data.frame in *SAV and I need save it in XLS.



2013/6/26 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
If you don't want all of the stuff in HorribleHack.SPS echoed in your output window, you could add some SET commands, like this:

SET PRINTBACK = OFF. /* Suppress output.


INSERT FILE = "C:\TEMP\HorribleHack.SPS".

SET PRINTBACK = ON. /* Turn output back on.


shasj wrote
Fine!

Thanks very much!


2013/6/25 Bruce Weaver [via SPSSX Discussion] <

[hidden email]>

> This can probably be done via Python.  But you could also use a native
> SPSS approach that some list members describe as a "horrible hack".  ;-)
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
>  codigo (A5)  age(F2.0) sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20  "M"
> "10002" 25  "M"
> "10002" 24  "F"
> "10005" 32  "F"
> "10005" 30  "M"
> "10007" 14  "M"
> "10007" 16  "F"
> "10007" 18  "M"
> END DATA.
>
> SORT CASES by codigo.
> MATCH FILES file = * / BY codigo / FIRST = FirstRec.
> EXECUTE.
>
> * Write commands to a syntax file.
>
> DO IF FirstRec.
> - WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
>  "TEMPORARY." /
>  "SELECT IF (codigo EQ ","'",codigo"'",")." /
>  "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS
> /VERSION=8/REPLACE/FIELDNAMES.".
> END IF.
> EXECUTE.
>
> * Now insert that syntax file.
>
> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
>
> * Clean up the junk .
>
> ERASE FILE = "C:\TEMP\HorribleHack.SPS".
>
> * ---------------------------------------------- .
>
> Contents of the resulting Excel files are:
>
> codigo age sex FirstRec
> 10001 10 F 1
> 10001 20 M 0
>
> codigo age sex FirstRec
> 10002 25 M 1
> 10002 24 F 0
>
> codigo age sex FirstRec
> 10005 32 F 1
> 10005 30 M 0
>
> codigo age sex FirstRec
> 10007 14 M 1
> 10007 16 F 0
> 10007 18 M 0
>
> HTH.
>
>
> shasj wrote
> All possible value of Var!
>
>
> 2013/6/24 Bruce Weaver [via SPSSX Discussion] <

> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=0>>
>

> > It might help if we include here your most recent post to the usenet
> > newsgroup.  (This mailing list is far more active these days than the
> > newsgroup.)  Here it is.
> >
> > *--- shasj's post to comp.soft-sys.stat.spss ---*
> >
> > I guess I was not clear. I need split my data.frame for one variable
> > (codigo)
> >
> > e.g
> >
> > NEW FILE.
> > DATASET CLOSE all.
> > DATA LIST FREE /
> >  codigo (A5)  age sex(A1).
> > BEGIN DATA.
> > "10001" 10 "F"
> > "10001" 20  "M"
> > "10002" 25  "M"
> > "10002" 24  "F"
> > "10005" 32  "F"
> > "10005" 30  "M"
> > "10007" 14  "M"
> > "10007" 16  "F"
> > "10007" 18  "M"
> > END DATA.
> >
> > TEMPORARY.
> > SELECT IF (codigo EQ "10001").
> > SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> > /VERSION=8
> > /REPLACE
> > /FIELDNAMES.
> >
> >
> > I do it for each value of the variable codigo (may I several values),
> but
> > I'd like run one macro that I do it only once.
> >
> >
> >
> > shasj wrote
> > Dear David Marso
> >
> > The Bruce's post run fine. But I have to say for what values for split
> >
> > see exemple below.
> >
> > I do it easily in the R software, but I need to do in SPSS too.
> >
> > Thanks for your help!
> >
> > !DO !V !IN(!Vlist)
> > !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> > TEMPORARY.
> > SELECT IF (VAR EQ !V).
> > SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
> >   /VERSION=8
> >   /REPLACE
> >   /FIELDNAMES.
> >
> > !DOEND
> >
> > !ENDDEFINE.
> >
> >
> > SET mprint on.
> > STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
> > "2628" "3211" "3291".
> > SET mprint off.
> >
> >
> >
> > 2013/6/24 David Marso [via SPSSX Discussion] <
> > [hidden email] <
http://user/SendEmail.jtp?type=node&node=5720871&i=0>>
> >
> > > Maybe a quick peek at the FM (fine manual) might illuminate?
> > > Or some strong coffee, a cold shower or more sleep?
> > > --
> > >
> > > shasj wrote
> > > I don´t understand very well what you say!
> > >
> > > But in the  Bruce's post I understand that I say for my macro the
> values
> > > of the my variable.
> > >
> > > STLoop Vlist = "4206" "4207".
> > >
> > > Not?
> > >
> > >  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?"
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> > discussion
> > > below:
> > >
> > >
> >
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> > >  To unsubscribe from SELECT IF LOOP, click here<
> >
>

>
> > > .
> > > NAML<
> >
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> ><

> http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E%3E>

>
> > >
> >
> >
> >
> > --
> > Sérgio Henrique Almeida da Silva Junior
> > Doutorando em Epidemiologia em Saúde Pública
> > Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> >
http://lattes.cnpq.br/1611345552843383
> > Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> >
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
> >
> >  --
> > Bruce Weaver

> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=1>

>
> >
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.
> > *
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
> >  To unsubscribe from SELECT IF LOOP, click here<
>

> > .
> > NAML<
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml><http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
> >


>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
>
http://lattes.cnpq.br/1611345552843383
> Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
>
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
>  --
> 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.
> *
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>

> http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720886.html
>  To unsubscribe from SELECT IF LOOP, click here<
> .
> NAML<
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ

http://lattes.cnpq.br/1611345552843383
Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637

http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro

--
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.





If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720896.html
To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ

http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637

http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro


View this message in context: Re: SELECT IF LOOP
Sent from the
SPSSX Discussion mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Bruce Weaver
Administrator
Could you post the link to it here, Jon?


Jon K Peck wrote
I posted an answer to this on another site where you duplicated this post.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:   shasj <[hidden email]>
To:     [hidden email],
Date:   06/26/2013 04:46 PM
Subject:        Re: [SPSSX-L] SELECT IF LOOP
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Thanks again!

I install the python plugin in SPSS and run the script

SPSSINC SPLIT DATASET SPLITVAR=VAR
/OUTPUT DIRECTORY= DELETECONTENTS=NOÂ
/OPTIONS NAMES=VALUES PRINTLIST=YES.

but it save my data.frame in *SAV and I need save it in XLS.



2013/6/26 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
If you don't want all of the stuff in HorribleHack.SPS echoed in your
output window, you could add some SET commands, like this:

SET PRINTBACK = OFF. /* Suppress output.

INSERT FILE = "C:\TEMP\HorribleHack.SPS".
SET PRINTBACK = ON. /* Turn output back on.


shasj wrote
Fine!

Thanks very much!


2013/6/25 Bruce Weaver [via SPSSX Discussion] <
[hidden email]>

> This can probably be done via Python. Â But you could also use a native
> SPSS approach that some list members describe as a "horrible hack".
 ;-)
>
> NEW FILE.
> DATASET CLOSE all.
> DATA LIST FREE /
> Â codigo (A5) Â age(F2.0) sex(A1).
> BEGIN DATA.
> "10001" 10 "F"
> "10001" 20 Â "M"
> "10002" 25 Â "M"
> "10002" 24 Â "F"
> "10005" 32 Â "F"
> "10005" 30 Â "M"
> "10007" 14 Â "M"
> "10007" 16 Â "F"
> "10007" 18 Â "M"
> END DATA.
>
> SORT CASES by codigo.
> MATCH FILES file = * / BY codigo / FIRST = FirstRec.
> EXECUTE.
>
> * Write commands to a syntax file.
>
> DO IF FirstRec.
> - WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
> Â "TEMPORARY." /
> Â "SELECT IF (codigo EQ ","'",codigo"'",")." /
> Â "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS
> /VERSION=8/REPLACE/FIELDNAMES.".
> END IF.
> EXECUTE.
>
> * Now insert that syntax file.
>
> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
>
> * Clean up the junk .
>
> ERASE FILE = "C:\TEMP\HorribleHack.SPS".
>
> * ---------------------------------------------- .
>
> Contents of the resulting Excel files are:
>
> codigo age sex FirstRec
> 10001 10 F 1
> 10001 20 M 0
>
> codigo age sex FirstRec
> 10002 25 M 1
> 10002 24 F 0
>
> codigo age sex FirstRec
> 10005 32 F 1
> 10005 30 M 0
>
> codigo age sex FirstRec
> 10007 14 M 1
> 10007 16 F 0
> 10007 18 M 0
>
> HTH.
>
>
> shasj wrote
> All possible value of Var!
>
>
> 2013/6/24 Bruce Weaver [via SPSSX Discussion] <
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=0>>
>

> > It might help if we include here your most recent post to the usenet
> > newsgroup. Â (This mailing list is far more active these days than the

> > newsgroup.) Â Here it is.
> >
> > *--- shasj's post to comp.soft-sys.stat.spss ---*
> >
> > I guess I was not clear. I need split my data.frame for one variable
> > (codigo)
> >
> > e.g
> >
> > NEW FILE.
> > DATASET CLOSE all.
> > DATA LIST FREE /
> > Â codigo (A5) Â age sex(A1).
> > BEGIN DATA.
> > "10001" 10 "F"
> > "10001" 20 Â "M"
> > "10002" 25 Â "M"
> > "10002" 24 Â "F"
> > "10005" 32 Â "F"
> > "10005" 30 Â "M"
> > "10007" 14 Â "M"
> > "10007" 16 Â "F"
> > "10007" 18 Â "M"
> > END DATA.
> >
> > TEMPORARY.
> > SELECT IF (codigo EQ "10001").
> > SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
> > /VERSION=8
> > /REPLACE
> > /FIELDNAMES.
> >
> >
> > I do it for each value of the variable codigo (may I several values),
> but
> > I'd like run one macro that I do it only once.
> >
> >
> >
> > shasj wrote
> > Dear David Marso
> >
> > The Bruce's post run fine. But I have to say for what values for split

> >
> > see exemple below.
> >
> > I do it easily in the R software, but I need to do in SPSS too.
> >
> > Thanks for your help!
> >
> > !DO !V !IN(!Vlist)
> > !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
> > TEMPORARY.
> > SELECT IF (VAR EQ !V).
> > SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
> > Â  /VERSION=8
> > Â  /REPLACE
> > Â  /FIELDNAMES.
> >
> > !DOEND
> >
> > !ENDDEFINE.
> >
> >
> > SET mprint on.
> > STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"

> > "2628" "3211" "3291".
> > SET mprint off.
> >
> >
> >
> > 2013/6/24 David Marso [via SPSSX Discussion] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720871&i=0>>

> >
> > > Maybe a quick peek at the FM (fine manual) might illuminate?
> > > Or some strong coffee, a cold shower or more sleep?
> > > --
> > >
> > > shasj wrote
> > > I don´t understand very well what you say!
> > >
> > > But in the  Bruce's post I understand that I say for my macro the
> values
> > > of the my variable.
> > >
> > > STLoop Vlist = "4206" "4207".
> > >
> > > Not?
> > >
> > > Â 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?"
> > >
> > >
> > > ------------------------------
> > > Â If you reply to this email, your message will be added to the
> > discussion
> > > below:
> > >
> > >
> >
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
> > > Â To unsubscribe from SELECT IF LOOP, click here<
> >
>
>
> > > .
> > > NAML<
> >
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml

> ><
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E
><
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E%3E>

>
> > >
> >
> >
> >
> > --
> > Sérgio Henrique Almeida da Silva Junior
> > Doutorando em Epidemiologia em Saúde Pública
> > Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> > http://lattes.cnpq.br/1611345552843383
> > Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> > http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
> >
> > Â --
> > Bruce Weaver
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5720886&i=1>

>
> > 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.
> > *
> >
> >
> > ------------------------------
> > Â If you reply to this email, your message will be added to the
> discussion
> > below:
> >
> >
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
> > Â To unsubscribe from SELECT IF LOOP, click here<
>
> > .
> > NAML<
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
><
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>

> >

>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
> http://lattes.cnpq.br/1611345552843383
> Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
> http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
> Â --
> 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.
> *
>
>
> ------------------------------
> Â If you reply to this email, your message will be added to the
discussion
> below:
>
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720886.html

> Â To unsubscribe from SELECT IF LOOP, click here< > .
> NAML<
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

>



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: <a href="tel:%2821%29%2068463637" value="+12168463637" target="_blank">(21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
--
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.



If you reply to this email, your message will be added to the discussion
below:
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720896.html

To unsubscribe from SELECT IF LOOP, click here.
NAML



--
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro

View this message in context: Re: SELECT IF LOOP
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
--
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
|

Autosvar: SELECT IF LOOP

Jazgul Ismailova-2

Hello,

Thank you for your mail. I am out of the office till 7th of the August. 
If urgent, please call or send a text message to +46708179069.

Best regards,

Jazgul Ismailova

 

Reply | Threaded
Open this post in threaded view
|

Re: SELECT IF LOOP

Jon K Peck
In reply to this post by Bruce Weaver
Here is the thread.

http://www.linkedin.com/groups/SELECT-IF-LOOP-44190.S.252475331?view=&srchtype=discussedNews&gid=44190&item=252475331&type=member&trk=eml-anet_dig-b_pd-pmt-cn&fromEmail=&ut=1fdavSFQrm05Q1


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Bruce Weaver <[hidden email]>
To:        [hidden email],
Date:        06/27/2013 06:25 AM
Subject:        Re: [SPSSX-L] SELECT IF LOOP
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Could you post the link to it here, Jon?



Jon K Peck wrote
> I posted an answer to this on another site where you duplicated this post.
>
>
> Jon Peck (no "h") aka Kim
> Senior Software Engineer, IBM

> peck@.ibm

> phone: 720-342-5621
>
>
>
>
> From:   shasj &lt;

> sergio.edfisica@

> &gt;
> To:

> SPSSX-L@.uga

> ,
> Date:   06/26/2013 04:46 PM
> Subject:        Re: [SPSSX-L] SELECT IF LOOP
> Sent by:        "SPSSX(r) Discussion" &lt;

> SPSSX-L@.uga

> &gt;
>
>
>
> Thanks again!
>
> I install the python plugin in SPSS and run the script
>
> SPSSINC SPLIT DATASET SPLITVAR=VAR
> /OUTPUT DIRECTORY= DELETECONTENTS=NOÂ
> /OPTIONS NAMES=VALUES PRINTLIST=YES.
>
> but it save my data.frame in *SAV and I need save it in XLS.
>
>
>
> 2013/6/26 Bruce Weaver [via SPSSX Discussion] <[hidden email]>
> If you don't want all of the stuff in HorribleHack.SPS echoed in your
> output window, you could add some SET commands, like this:
>
> SET PRINTBACK = OFF. /* Suppress output.
>
> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
> SET PRINTBACK = ON. /* Turn output back on.
>
>
> shasj wrote
> Fine!
>
> Thanks very much!
>
>
> 2013/6/25 Bruce Weaver [via SPSSX Discussion] <
> [hidden email]>
>
>> This can probably be done via Python. Â But you could also use a native
>> SPSS approach that some list members describe as a "horrible hack".
> Â ;-)
>>
>> NEW FILE.
>> DATASET CLOSE all.
>> DATA LIST FREE /
>> Â codigo (A5) Â age(F2.0) sex(A1).
>> BEGIN DATA.
>> "10001" 10 "F"
>> "10001" 20 Â "M"
>> "10002" 25 Â "M"
>> "10002" 24 Â "F"
>> "10005" 32 Â "F"
>> "10005" 30 Â "M"
>> "10007" 14 Â "M"
>> "10007" 16 Â "F"
>> "10007" 18 Â "M"
>> END DATA.
>>
>> SORT CASES by codigo.
>> MATCH FILES file = * / BY codigo / FIRST = FirstRec.
>> EXECUTE.
>>
>> * Write commands to a syntax file.
>>
>> DO IF FirstRec.
>> - WRITE OUTFILE "C:\TEMP\HorribleHack.SPS" /
>> Â "TEMPORARY." /
>> Â "SELECT IF (codigo EQ ","'",codigo"'",")." /
>> Â "SAVE TRANSLATE OUTFILE ='c:\Temp\",codigo,"_GR.XLS'/TYPE =XLS
>> /VERSION=8/REPLACE/FIELDNAMES.".
>> END IF.
>> EXECUTE.
>>
>> * Now insert that syntax file.
>>
>> INSERT FILE = "C:\TEMP\HorribleHack.SPS".
>>
>> * Clean up the junk .
>>
>> ERASE FILE = "C:\TEMP\HorribleHack.SPS".
>>
>> * ---------------------------------------------- .
>>
>> Contents of the resulting Excel files are:
>>
>> codigo age sex FirstRec
>> 10001 10 F 1
>> 10001 20 M 0
>>
>> codigo age sex FirstRec
>> 10002 25 M 1
>> 10002 24 F 0
>>
>> codigo age sex FirstRec
>> 10005 32 F 1
>> 10005 30 M 0
>>
>> codigo age sex FirstRec
>> 10007 14 M 1
>> 10007 16 F 0
>> 10007 18 M 0
>>
>> HTH.
>>
>>
>> shasj wrote
>> All possible value of Var!
>>
>>
>> 2013/6/24 Bruce Weaver [via SPSSX Discussion] <
>> [hidden email]
>> &lt;
http://user/SendEmail.jtp?type=node&amp;node=5720886&amp;i=0&gt;>
>>
>
>> > It might help if we include here your most recent post to the usenet
>> > newsgroup. Â (This mailing list is far more active these days than the
>
>> > newsgroup.) Â Here it is.
>> >
>> > *--- shasj's post to comp.soft-sys.stat.spss ---*
>> >
>> > I guess I was not clear. I need split my data.frame for one variable
>> > (codigo)
>> >
>> > e.g
>> >
>> > NEW FILE.
>> > DATASET CLOSE all.
>> > DATA LIST FREE /
>> > Â codigo (A5) Â age sex(A1).
>> > BEGIN DATA.
>> > "10001" 10 "F"
>> > "10001" 20 Â "M"
>> > "10002" 25 Â "M"
>> > "10002" 24 Â "F"
>> > "10005" 32 Â "F"
>> > "10005" 30 Â "M"
>> > "10007" 14 Â "M"
>> > "10007" 16 Â "F"
>> > "10007" 18 Â "M"
>> > END DATA.
>> >
>> > TEMPORARY.
>> > SELECT IF (codigo EQ "10001").
>> > SAVE TRANSLATE OUTFILE ="c:/10001_GR.XLS"/TYPE =XLS
>> > /VERSION=8
>> > /REPLACE
>> > /FIELDNAMES.
>> >
>> >
>> > I do it for each value of the variable codigo (may I several values),
>> but
>> > I'd like run one macro that I do it only once.
>> >
>> >
>> >
>> > shasj wrote
>> > Dear David Marso
>> >
>> > The Bruce's post run fine. But I have to say for what values for split
>
>> >
>> > see exemple below.
>> >
>> > I do it easily in the R software, but I need to do in SPSS too.
>> >
>> > Thanks for your help!
>> >
>> > !DO !V !IN(!Vlist)
>> > !LET !F = !QUOTE(!CONCAT(!UNQUOTE(!V),"_GR.XLS"))
>> > TEMPORARY.
>> > SELECT IF (VAR EQ !V).
>> > SAVE TRANSLATE OUTFILE = !F /TYPE =XLS
>> > Â  /VERSION=8
>> > Â  /REPLACE
>> > Â  /FIELDNAMES.
>> >
>> > !DOEND
>> >
>> > !ENDDEFINE.
>> >
>> >
>> > SET mprint on.
>> > STLoop Vlist = "0004" "0388" "0514" "0973" "1545" "1940" "2178" "2273"
>
>> > "2628" "3211" "3291".
>> > SET mprint off.
>> >
>> >
>> >
>> > 2013/6/24 David Marso [via SPSSX Discussion] <
>> > [hidden email]
>> &lt;
http://user/SendEmail.jtp?type=node&amp;node=5720871&amp;i=0&gt;>
>
>> >
>> > > Maybe a quick peek at the FM (fine manual) might illuminate?
>> > > Or some strong coffee, a cold shower or more sleep?
>> > > --
>> > >
>> > > shasj wrote
>> > > I don´t understand very well what you say!
>> > >
>> > > But in the  Bruce's post I understand that I say for my macro the
>> values
>> > > of the my variable.
>> > >
>> > > STLoop Vlist = "4206" "4207".
>> > >
>> > > Not?
>> > >
>> > > Â 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?"
>> > >
>> > >
>> > > ------------------------------
>> > > Â If you reply to this email, your message will be added to the
>> > discussion
>> > > below:
>> > >
>> > >
>> >
>>
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720867.html
>> > > Â To unsubscribe from SELECT IF LOOP, click here<
>> >
>>
>>
>> > > .
>> > > NAML<
>> >
>>
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>
>> ><
>>
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E
>><
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E%3E>
>
>>
>> > >
>> >
>> >
>> >
>> > --
>> > Sérgio Henrique Almeida da Silva Junior
>> > Doutorando em Epidemiologia em Saúde Pública
>> > Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
>> >
http://lattes.cnpq.br/1611345552843383
>> > Tel:
> (21) 68463637
>> >
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>> >
>> > Â --
>> > Bruce Weaver
>> > [hidden email]
>> &lt;
http://user/SendEmail.jtp?type=node&amp;node=5720886&amp;i=1&gt;
>
>>
>> >
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.
>> > *
>> >
>> >
>> > ------------------------------
>> > Â If you reply to this email, your message will be added to the
>> discussion
>> > below:
>> >
>> >
>>
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720871.html
>> > Â To unsubscribe from SELECT IF LOOP, click here<
>>
>> > .
>> > NAML<
>>
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>><
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
>
>> >
>
>>
>>
>>
>> --
>> Sérgio Henrique Almeida da Silva Junior
>> Doutorando em Epidemiologia em Saúde Pública
>> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
>>
http://lattes.cnpq.br/1611345552843383
>> Tel: <tel:%2821%29%2068463637>  > (21) 68463637
>>
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>>
>> Â --
>> 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.
>> *
>>
>>
>> ------------------------------
>> Â If you reply to this email, your message will be added to the
> discussion
>> below:
>>
>>
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720886.html
>
>> Â To unsubscribe from SELECT IF LOOP, click here< > .
>> NAML<
>
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>>
>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
>
http://lattes.cnpq.br/1611345552843383
> Tel: <tel:%2821%29%2068463637>  > (21) 68463637
>
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
> --
> 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.
>
>
>
> If you reply to this email, your message will be added to the discussion
> below:
>
http://spssx-discussion.1045642.n5.nabble.com/SELECT-IF-LOOP-tp5720860p5720896.html
>
> To unsubscribe from SELECT IF LOOP, click here.
> NAML
>
>
>
> --
> Sérgio Henrique Almeida da Silva Junior
> Doutorando em Epidemiologia em Saúde Pública
> Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
>
http://lattes.cnpq.br/1611345552843383
> Tel: (21) 68463637
>
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro
>
> View this message in context: Re: SELECT IF LOOP
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
> <tel:%2821%29%2068463637>




-----
--
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/SELECT-IF-LOOP-tp5720860p5720912.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