LoginSignup
0
0

More than 3 years have passed since last update.

SASでデータセットをまとめて取得

Posted at

ライブラリTEST内にSMPL_yyyymmddの形式で保存されているデータセットをまとめて取得する。
TEST.SMPL_20191031
TEST.SMPL_20191130
TEST.SMPL_20191231

* マクロ変数dsnに空白区切りでデータセット名を格納 ;
proc sql ;
    select kcompress(libname || "." || memname)
    into :dsn separated by " "
    from  dictionary.tables
    where libname eq "TEST"
    and   prxmatch("m/^SMPL_(\d{8})$/", kcompress(memname)) > 0
    ;
quit ;

* %put &dsn. ;

data aggr_smpl ;
    set &dsn. ;
run ;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0