/* where */
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 print data=data1;
where Id1=1111;
run;
![](https://how-to-business.com/wp-content/uploads/2021/12/where_1.png)
![](https://how-to-business.com/wp-content/uploads/2021/12/where_2.png)
- printプロシージャ内でwhere文は使える。
/* if */
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 print data=data1;
if Id1=1111;
run;
![](https://how-to-business.com/wp-content/uploads/2021/12/if_1.png)
![](https://how-to-business.com/wp-content/uploads/2021/12/if_2.png)
- printプロシージャ内でif文は使えない。