Split large SAS dataset into smaller datasets

前端 未结 6 534
长情又很酷
长情又很酷 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:04

    You can do it without macros at all, if you don't mind asking for datasets that may not exist, and have a reasonable bound on things.

    data want1 want2 want3 want4 want5 want6 want7 want8 want9;
    if _n_ le 2.5e5 then output want1;
    else if _n_ le 5e5 then output want2;
    else if _n_ le 7.5e5 then output want3;
    ... etc....
    run;
    

    Macros would make that more efficient to program and cleaner to read, but wouldn't change how it actually runs in reality.

提交回复
热议问题