SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Let statement

    Posted Tue January 23, 2024 01:03 PM

    Hello ,

    As SAS user, i would have created a report_date and path macros as follows:

    %let report_date = 01012023 ;

    %let path = "C/folderlocation/.."

    title "Report generated on &report_date";

    proc;

    .....

    run;

    How can these macros be created in SPSS, and how we call them when is needed?

    Thank you .



    ------------------------------
    IBMcode SPSS
    ------------------------------


  • 2.  RE: Let statement

    Posted Tue January 23, 2024 01:11 PM
    SPSS has a general macro facility.  Look up DEFINE in the Command Syntax Reference for details.  Here is an example.

    define !path () "report_date = 0101202" !enddefine.

    SUMMARIZE
      /TABLES=salary
      /FORMAT=NOLIST TOTAL
      /TITLE=!path
      /CELLS=COUNT

    --





  • 3.  RE: Let statement

    Posted Tue January 23, 2024 01:17 PM

    Hi Jon,

    Ok, i understand.

    Thank you for your clarification.



    ------------------------------
    IBMcode SPSS
    ------------------------------