Hi,
Is there still any way to use the FINISH command? It seems to be specific for batch processing and/or unix like systems. The CSR (aka FM) is not mentioning anything about this: * FINISH is optional in a command file and is used tomark the end of a session. * FINISH causes the program to stop reading commands. Anything following FINISH in theFINISH in an INCLUDE file are ignored. command file is ignored. Any commands following is optional in a command file and is used tomark the end of a session. On Windows, all I get when I run it is: >The FINISH command is not permitted when using the SPSS Statistics Manager I also tried using SendKeys, to simulate a CTRL-plus-PERIOD key press but that had no effect either. import SendKeys SendKeys.SendKeys("^.") An earlier discussion on this list made me curious about a way to stop Spss processing under certain conditions. Sure, a RuntimeError is raised, but Spss happily continues running subsequent commands. * sample data. data list free / gender (f) treatment (f). begin data 1 1 0 1 0 2 0 9 end data. value labels gender 1 "male" 0 "female" / treatment 1 "hysterectomy" 2 "appendectomy" 9 "lobotomy". dataset name data. * men can't possibly undergo a uturus extirpation. compute impossible = (valuelabel(gender) eq "male" and valuelabel(treatment) eq "hysterectomy"). dataset declare agg. aggregate outfile = agg /impossible = max(impossible). dataset activate agg. begin program. import spss error = False try: cur = spss.Cursor() record = cur.fetchone() if 1 in record: error = True raise RuntimeError("ERROR: impossible combination of values") finally: cur.close() spss.Submit("dataset close agg.") if error: spss.Submit("finish.") end program. dataset activate data. crosstabs gender by treatment. /* ---- this should not run, yet it does!!!. Regards, Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever done for us? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================== 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 |
"Finish" was a command used in the mainframe days to end a batch session. I believe it was the only way to have SPSS stop processing,job or, if an interactive (line oriented) session was possible, to end the clean up after itself, and end all related processing. I assume that the Unix version is still based on this model. With the Windows version, click to shut down the program. It is likely that that no one thought that is a workaround for this. [hidden email] On Fri, Jun 28, 2013 at 10:18 AM, Albert-Jan Roskam <[hidden email]> wrote: Hi, |
Free forum by Nabble | Edit this page |