LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 21 Feb 2011 19:16:48 -0800
Reply-To:   drfg2008 <kontakt@datest.de>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   drfg2008 <kontakt@datest.de>
In-Reply-To:   <OF529CD4FE.41796BAD-ON8725783F.00012DBE-8725783F.00016DB7@us.ibm.com>
Content-Type:   text/plain; charset=us-ascii

Thanks, temporary worked! Thanks also to "SPSSINC SPLIT DATASET extension command" I'm checking this right now.

This is a working Syntax (with my more elementary version). But it's quite fast.

*---- Split file and generate new files according to labels of a key variable --.

*------------------------ generate Data (start) ------------------------------.

input program. loop a =1 to 100000 by 1. end case. end loop. end file. end input program. exe.

comp gruppe=RV.BINOM(10,0.5). COMP av_1=RV.NORMAL(1,10). COMP av_2=RV.NORMAL(1,10). COMP av_3=RV.NORMAL(1,10). COMP av_4=RV.NORMAL(1,10). EXECUTE .

SAVE OUTFILE='C:\<path>\FILE_SPLITTEN.sav'.

*--- End: generate Data --------------.

*----- Start -------------------------.

GET FILE='C:\<path>\FILE_SPLITTEN.sav'. DATASET NAME DatenSet1 WINDOW=FRONT.

AUTORECODE VARIABLES=gruppe /INTO gruppe_codiert /PRINT.

DATASET DECLARE anzahl_gruppen. AGGREGATE /OUTFILE='anzahl_gruppen' /BREAK=gruppe /N_BREAK=N.

DATASET ACTIVATE anzahl_gruppen.

BEGIN PROGRAM. import spss FileGROUPS=spss.GetCaseCount() spss.Submit("DATASET ACTIVATE DatenSet1.")

for i in range(FileGROUPS): spss.Submit("temporary.") spss.Submit(" SELECT IF gruppe_codiert = " +str(i) +".") spss.Submit("SAVE OUTFILE='C:/<path>/gruppe_ " +str( i) + ".sav'")

END PROGRAM.

----- FUB

-- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/close-a-file-sav-with-syntax-tp3394752p3394928.html Sent from the SPSSX Discussion mailing list archive at Nabble.com.

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (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


Back to: Top of message | Previous page | Main SPSSX-L page