|
Hello!
I'm looking for a macro, that is able to save different output files. I've got data which are structuresd for example in the following way: Var1 Var2 Var3 REGION1 100 200 REGION1 101 201 REGION1 102 202 REGION2 102 202 REGION2 101 201 ..... REGION20 101 201 REGION20 101 201 Now I need a separate output for every region. The macro for the needed statistics is no problem. DEFINE MacUni (!POS !CAHREND('/')). DO !i IN !1 FREQUENCIES ... !DOEND. ENDDEFINE. But I don't now, how to handle the Outputs in a macro. Thank You Peter Müller |
|
Hi Peter,
Did you consider using OMS (= output management system)? You should use the menu to generate the syntax . It's available in (I think) v12 and higher. It enables you to 'recycle' output, so that you eventually can save output as e.g. xls files. Cheers!! Albert-Jan --- "<Peter M?>" <[hidden email]> wrote: > Hello! > > I'm looking for a macro, that is able to save > different output files. > > I've got data which are structuresd for example in > the following way: > > Var1 Var2 Var3 > REGION1 100 200 > REGION1 101 201 > REGION1 102 202 > REGION2 102 202 > REGION2 101 201 > ..... > REGION20 101 201 > REGION20 101 201 > > Now I need a separate output for every region. > > The macro for the needed statistics is no problem. > DEFINE MacUni (!POS !CAHREND('/')). > DO !i IN !1 > FREQUENCIES ... > > !DOEND. > ENDDEFINE. > > But I don't now, how to handle the Outputs in a > macro. > > Thank You > > Peter Müller > Cheers! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 |
|
In reply to this post by <Peter M?>
You could if you have V15 use the OUTPUT NEW command and the OUTPUT CLOSE command, and the OUTPUT SAVE command
You could put this into the loop e.g DEFINE MacUni (!POS !CAHREND('/')). DO !i IN !1 OUTPUT NEW. FREQUENCIES ... OUTPUT SAVE. OUTPUT close. !DOEND. ENDDEFINE. HtH Mike -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Albert-jan Roskam Sent: 20 August 2007 11:01 To: [hidden email] Subject: Re: MACRO for different Outputs Hi Peter, Did you consider using OMS (= output management system)? You should use the menu to generate the syntax . It's available in (I think) v12 and higher. It enables you to 'recycle' output, so that you eventually can save output as e.g. xls files. Cheers!! Albert-Jan --- "<Peter M?>" <[hidden email]> wrote: > Hello! > > I'm looking for a macro, that is able to save > different output files. > > I've got data which are structuresd for example in > the following way: > > Var1 Var2 Var3 > REGION1 100 200 > REGION1 101 201 > REGION1 102 202 > REGION2 102 202 > REGION2 101 201 > ..... > REGION20 101 201 > REGION20 101 201 > > Now I need a separate output for every region. > > The macro for the needed statistics is no problem. > DEFINE MacUni (!POS !CAHREND('/')). > DO !i IN !1 > FREQUENCIES ... > > !DOEND. > ENDDEFINE. > > But I don't now, how to handle the Outputs in a > macro. > > Thank You > > Peter Müller > Cheers! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ |
|
In reply to this post by <Peter M?>
Hello and many thanks for your answers.
Unforunately I'm using SPSS V12, so the OUTPUT - statement doesn't work. And I have to give a title to the different outputs. Maybe someone has got a solution? Thanks Peter |
| Free forum by Nabble | Edit this page |
