Split large SAS dataset into smaller datasets

前端 未结 6 479
长情又很酷
长情又很酷 2021-01-13 01:10

I need some assistance with splitting a large SAS dataset into smaller datasets.

Each month I\'ll have a dataset containing a few million records. This number will

6条回答
  •  清酒与你
    2021-01-13 02:03

    You can do it without macros, using CALL EXECUTE(). It creates SAS-code as text strings and then executes it, after your "manually written" code completed.

    data _null_;
        if 0 then set have nobs=n;
        do i=1 to ceil(n/250000);
            call execute (cats("data want",i)||";");
            call execute ("set have(firstobs="||(i-1)*250000+1||" obs="||i*250000||");");
            call execute ("run;");
        end;
    run;
    

提交回复
热议问题