문제

I have a report need to send other sharedrive, need to send title and the date. How can I do that

     PROC EXPORT DATA= WORK.ARG_REPORT
        OUTFILE= "/dwdata/sas_data/REPORT.csv" REPLACE;

  RUN;

what can i add to REPORT for see the date? thaks

도움이 되었습니까?

해결책

You need to create a macro variable with the date especially if the date will change depending on when you run the code. Then reference that variable in the export statement. The code below grabs today's date.

%let numdate = %sysfunc(today(), yymmddn8.);

PROC EXPORT DATA= WORK.ARG_REPORT
            OUTFILE= "/dwdata/sas_data/REPORT_&numdate..csv"  
            DBMS=CSV  REPLACE;
RUN;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top