I do not have access to SPSS at the moment or I would just test it.
It is possible to put INSERT commands inside a syntax file that is INSERTed? For example INSERT FILE= 'c:\project\fix data entry errors.sps'. then the contents of that file would be something like . . . INSERT FILE= 'c:\project\repairs\fix jurisdiction.sps'. INSERT FILE= 'c:\project\repairs\fix plaintiff.sps'. INSERT FILE= 'c:\project\repairs\fix defendant.sps'. INSERT FILE= 'c:\project\repairs\fix Judge FN.sps'. INSERT FILE= 'c:\project\repairs\fix Judge LN.sps'. . . .
Art Kendall
Social Research Consultants |
INSERTS can be nested up to five deep.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Art Kendall <[hidden email]> To: [hidden email] Date: 10/11/2014 09:04 AM Subject: [SPSSX-L] Can an INSERTed syntax file contain other INSERT commands? Sent by: "SPSSX(r) Discussion" <[hidden email]> I do not have access to SPSS at the moment or I would just test it. It is possible to put INSERT commands inside a syntax file that is INSERTed? For example INSERT FILE= 'c:\project\fix data entry errors.sps'. then the *contents *of that file would be something like . . . INSERT FILE= 'c:\project\repairs\fix jurisdiction.sps'. INSERT FILE= 'c:\project\repairs\fix plaintiff.sps'. INSERT FILE= 'c:\project\repairs\fix defendant.sps'. INSERT FILE= 'c:\project\repairs\fix Judge FN.sps'. INSERT FILE= 'c:\project\repairs\fix Judge LN.sps'. . . . ----- Art Kendall Social Research Consultants -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Can-an-INSERTed-syntax-file-contain-other-INSERT-commands-tp5727567.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 ===================== 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 |
thank you
Art Kendall
Social Research Consultants |
In reply to this post by Jon K Peck
If 5 levels is not deep enough, you can use a simple Python function to do it:
BEGIN PROGRAM. import codecs, locale import spss def insert(syntax): encoding = locale.getdefaultlocale()[1] f = codecs.open(syntax, encoding=encoding): if f.read().startswith(codecs.BOM_UTF8): f.close() f = codecs.open(syntax, encoding="utf-8"): spss.Submit(f.read().lstrip(codecs.BOM_UTF8)) insert(r"c:\blah.sps")END PROGRAM. 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? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >________________________________ > From: Jon K Peck <[hidden email]> >To: [hidden email] >Sent: Saturday, October 11, 2014 5:17 PM >Subject: Re: [SPSSX-L] Can an INSERTed syntax file contain other INSERT commands? > > > >INSERTS can be nested up to five deep. > > >Jon Peck (no "h") aka Kim >Senior Software Engineer, IBM >[hidden email] >phone: 720-342-5621 > > > > >From: >To: [hidden email] >Date: 10/11/2014 09:04 AM >Subject: [SPSSX-L] Can an INSERTed syntax file contain other INSERT commands? >Sent by: "SPSSX(r) Discussion" <[hidden email]> >>________________________________ > > > >I do not have access to SPSS at the moment or I would just test it. > >It is possible to put INSERT commands inside a syntax file that is INSERTed? > >For example >INSERT FILE= 'c:\project\fix data entry errors.sps'. > >then the *contents *of that file would be something like >. . . >INSERT FILE= 'c:\project\repairs\fix jurisdiction.sps'. >INSERT FILE= 'c:\project\repairs\fix plaintiff.sps'. >INSERT FILE= 'c:\project\repairs\fix defendant.sps'. >INSERT FILE= 'c:\project\repairs\fix Judge FN.sps'. >INSERT FILE= 'c:\project\repairs\fix Judge LN.sps'. >. . . > > > > > > > >----- >Art Kendall >Social Research Consultants >-- >View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Can-an-INSERTed-syntax-file-contain-other-INSERT-commands-tp5727567.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 > > > > > > > >===================== command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD > > ===================== 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 |