SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 


#Analytics
#SPSSStatistics
#Analyticstools
 View Only
  • 1.  Send Auto Emails

    Posted 09/18/20 12:32 PM

    I have this syntax to split and save as a csv. Is there anyway to write, either before or after the csv, to auto-email to an email that's listed in the file that's split? Below is what i have so far.

    get file='c:\datab\e21\temp34.sav' /keep emp schoolSA lnameC fnameC fnameTN lnameTN licTN name /rename schoolSA=school.

    select if not missing(name) and not missing(licTN).

    save outfile= "C:\datab\e21\school\school 9.17.20.sav".

    get file= "C:\datab\e21\school\school 9.17.20.sav".

    *file split.

    spssinc split dataset splitvar = school

    /OUTPUT DIRECTORY= "C:\datab\e21\school\Knox_"DELETECONTENTS = NO

    FILENAME = "${school}"

    /OPTIONS NAMES =VALUES PRINTLIST=YES .

    *process sav to csv.

    SPSSINC PROCESS FILES INPUTDATA="c:\datab\e21\school\Knox_\*.sav"

    SYNTAX="c:\General Syntax 20-21\convertSavToCsv2.sps" CONTINUEONERROR=YES

    VIEWERFILE= "c:\datab\e21\convert.spv" CLOSEDATA=YES.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Send Auto Emails

    Posted 09/18/20 12:51 PM

    You would need to use one of the Python libraries to send email. Details depend on your email system and the protocols you want to use. Google for "send email with Python" to see some possibilities. Here's one link that is a tutorial on this.

    https://realpython.com/python-send-email/






    #SPSSStatistics
    #Support
    #SupportMigration