• call spss macro from python

    From malika elkadali@21:1/5 to All on Sun Sep 5 13:59:15 2021
    Hi all,
    i want to execute this spss code in python but ; i dont' know how can i call the code bethween DEFINE and !ENDDEFINE into python code (HOTDECK y=SALAIRE / deck=AGE :
    DEFINE HOTDECK (y = !charend ('/')/deck = !charend ("/")).
    Output New name = hotdeckextra.
    !do !s !in (!y).
    .
    .
    rename variables (newvar = !newname).
    !doend.
    output close name = hotdeckextra.
    !ENDDEFINE.

    GET FILE = 'D:\app\test.sav'.
    HOTDECK y=SALAIRE / deck=AGE.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich Ulrich@21:1/5 to elkadalim@gmail.com on Mon Sep 6 13:16:50 2021
    On Sun, 5 Sep 2021 13:59:15 -0700 (PDT), malika elkadali
    <elkadalim@gmail.com> wrote:

    Hi all,
    i want to execute this spss code in python but ; i dont' know how can i call the code bethween DEFINE and !ENDDEFINE into python code (HOTDECK y=SALAIRE / deck=AGE :
    DEFINE HOTDECK (y = !charend ('/')/deck = !charend ("/")).
    Output New name = hotdeckextra.
    !do !s !in (!y).
    .
    .
    rename variables (newvar = !newname).
    !doend.
    output close name = hotdeckextra.
    !ENDDEFINE.

    GET FILE = 'D:\app\test.sav'.
    HOTDECK y=SALAIRE / deck=AGE.

    The experts on using python no longer read this usenet group.

    You can try your question at the SPSS list (see below) - which,
    unfortunately, has had a complexity added to using it. NABBLE
    and the list used to be the same thing, but the link is no longer
    assured.

    I will mention that Jon (or whoever) will probably want to know
    what you are trying to accomplish -- There may already be some
    provision for what you detailed in your longer post.

    Bruce Weaver posted a few weeks ago.
    * * *
    Hello everyone. On multiple occasions in the past, I have posted the
    following advice in this forum:

    The SPSS mailing list (http://spssx-discussion.1045642.n5.nabble.com/)
    is a lot more active than this forum these days. You might want to
    join that list (if not already a member) and post your question there.
    Via the page given above, click on -more options- near the top for
    info on how to subscribe. HTH.

    That advice is no longer relevant for two reasons.

    1. The address of the SPSSX Discussion forum on Nabble has been
    changed to:

    http://spssx-discussion.165.s1.nabble.com/

    2. More importantly, the link between that discussion forum and the
    SPSSX-L listserv mailing list administered by UGA has been severed.

    I don't have any hard data, but I suspect that the actual mailing list
    has more active members than the Nabble forum does. Here is the
    website for the UGA listserv, in case anyone wishes to subscribe to
    that list:

    https://listserv.uga.edu

    Cheers,
    Bruce
    * * *

    Rich Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)