今回はCONTENTSプロシージャについて解説します。
/* data1 */
data data1;
Id1=1111; Id2=1111; Id3=1111;
output;
Id1=2222; Id2=2222; Id3=2222;
output;
Id1=3333; Id2=3333; Id3=3333;
output;
run;
proc contents data=_all_; run;

- contentsプロシージャによりWORKライブラリに含まれるデータセットのリストとデータセットの内容が表示される。
/* data1 data2 */
data data1;
Id1=1111; Id2=1111; Id3=1111;
output;
Id1=2222; Id2=2222; Id3=2222;
output;
Id1=3333; Id2=3333; Id3=3333;
output;
run;
data data2;
Id1=1111; Id2=1111; Id3=1111;
output;
Id1=2222; Id2=2222; Id3=2222;
output;
Id1=3333; Id2=3333; Id3=3333;
output;
run;
proc contents data=_all_; run;

- contentsプロシージャによりWORKライブラリに含まれるデータセットのリストとデータセットの内容が表示される。
- データセットが複数ある場合、その分リストと内容情報は増える。
/* data=data1 */
data data1;
Id1=1111; Id2=1111; Id3=1111;
output;
Id1=2222; Id2=2222; Id3=2222;
output;
Id1=3333; Id2=3333; Id3=3333;
output;
run;
data data2;
Id1=1111; Id2=1111; Id3=1111;
output;
Id1=2222; Id2=2222; Id3=2222;
output;
Id1=3333; Id2=3333; Id3=3333;
output;
run;
proc contents data=data1; run;

- contentsプロシージャによりWORKライブラリに含まれるデータセットのリストとデータセットの内容が表示される。
- データセットが複数有っても、データセット名を指定することで対象のみ内容表示できる。(データセット名の一覧リストは表示されない。)