Hi all,
My question is about using the “write outfile” command in a manner like “dataset declare” and managing multiple sps syntaxes as its possible for “dataset declare” and sav files: DATASET DECLARE corrmatrix. REGRESSION /DEPENDENT=var1 /METHOD=ENTER var2 to var10 /OUTFILE=CORB(corrmatrix). DATASET ACTIVATE corrmatrix. Actually I execute “write outfile” for syntax files and insert them in a second step, then use erase commands if necessary. Is there another or smarter way to do such jobs, fe something like this “sps file declare “ “Sps file activate + run” Thanks for comments Milko |
It sounds to me like “Sps file activate + run” is the same as INSERT FILE (and declaring a sps file makes no sense off-hand). To get more useful advice for your workflow you might need to spill the beans on alot more of what you are trying to do - it may be you don't need to write an outfile of syntax and insert it later on anyway.
|
Administrator
|
In reply to this post by Mumdzhiev
What exactly are you attempting to achieve?
In a nutshell there is NO such thing as 'syntax declare'. Can't really see the point! " Is there another or smarter way to do such jobs". I have a suspicion that indeed there is, but you haven't provided any sketch of What you are really trying to do so I will keep my mouth shut!
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?" |
In reply to this post by Mumdzhiev
At 06:09 AM 1/30/2014, Mumdzhiev wrote:
>My question is about using the "write outfile" command in a manner >like "dataset declare" and managing multiple sps syntaxes as its >possible for "dataset declare" and sav files: >... >I execute "write outfile" for syntax files and insert them in a >second step, then use erase commands if necessary. Is there another >or smarter way to do such jobs, something like this >"sps file declare " >"Sps file activate + run" If I understand you, you're asking if a syntax window, or the like, could be treated something like a dataset: given a name, written to by SPSS programs, and used like a file on INSERT; and then be discarded, either by a command within SPSS or when SPSS closes. Unfortunately, no. Syntax windows aren't part of the environment of the SPSS processor, the way datasets are; they exist (I believe) only in the SPSS front-end that runs the menus. Interesting. Now, I believe the SPSS Python environment *does* have access to the syntax windows. I'm running too old a version to investigate this, but I wonder if three or so extension commands could be written to, A. Create a syntax window from a running SPSS program; B. Act analogously to WRITE OUTFILE: within a transformation program, write generated text to a syntax window, instead of to a file; C. Analogously to INSERT, incorporate the contents of a syntax window into a running program. As a Python mostly-outsider, I'd guess that A. could be done, but if B. and C. were to work, the opened window would have to also be given a name by which it could be referred to. Given a way of naming a syntax window to Python, it should be fairly direct to read that window's contents and incorporate it (probably via SPSS.SUBMIT) into a running SPSS program (step C). And I've no idea whether B. would be practicable at all. ===================== 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 |
A, B, and C could all be easily done with
Python programs or incorporated into extension commands, but why?
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Richard Ristow <[hidden email]> To: [hidden email], Date: 01/30/2014 03:20 PM Subject: Re: [SPSSX-L] write outfile and syntax declare Sent by: "SPSSX(r) Discussion" <[hidden email]> At 06:09 AM 1/30/2014, Mumdzhiev wrote: >My question is about using the "write outfile" command in a manner >like "dataset declare" and managing multiple sps syntaxes as its >possible for "dataset declare" and sav files: >... >I execute "write outfile" for syntax files and insert them in a >second step, then use erase commands if necessary. Is there another >or smarter way to do such jobs, something like this >"sps file declare " >"Sps file activate + run" If I understand you, you're asking if a syntax window, or the like, could be treated something like a dataset: given a name, written to by SPSS programs, and used like a file on INSERT; and then be discarded, either by a command within SPSS or when SPSS closes. Unfortunately, no. Syntax windows aren't part of the environment of the SPSS processor, the way datasets are; they exist (I believe) only in the SPSS front-end that runs the menus. Interesting. Now, I believe the SPSS Python environment *does* have access to the syntax windows. I'm running too old a version to investigate this, but I wonder if three or so extension commands could be written to, A. Create a syntax window from a running SPSS program; B. Act analogously to WRITE OUTFILE: within a transformation program, write generated text to a syntax window, instead of to a file; C. Analogously to INSERT, incorporate the contents of a syntax window into a running program. As a Python mostly-outsider, I'd guess that A. could be done, but if B. and C. were to work, the opened window would have to also be given a name by which it could be referred to. Given a way of naming a syntax window to Python, it should be fairly direct to read that window's contents and incorporate it (probably via SPSS.SUBMIT) into a running SPSS program (step C). And I've no idea whether B. would be practicable at all. ===================== 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 |
Free forum by Nabble | Edit this page |