markdown SAS的全球声明

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown SAS的全球声明相关的知识,希望对你有一定的参考价值。

# Global statements in SAS

## List of global statements in SAS

1. title
2. options
3. footnote


## Properties of global statements in SAS

1. Run once and stays for session of the model. 
2. Can be overwritten. To overwrite, simply **redefine**.
3. Can have max **10 titles**.


```sas
proc print data=work.test;
run;
title `this is my 1st title`;
title2 `this is my second title`;
title3 `this is my third title`;
title4 `this is my fourth title`'
title5 `this is my fifth title`;
title6 `this is my sixth title`;
title7 `this is my seventh title`;
title8 `this is my eighth title`;
title9 `this is my ninth title`;
title10 `this is my tenth title`;
title5 `this is my new fifth title`;

proc print data=work.test;
run;
```

In the code above
1. Title was defined once and then overwritten.
2. titles can be defined max 10 times. 
3. redefining removes the previous one. 


## Clearing previous title **title;**

```sas
proc means data=work.test;
run;

title ;
```

## footnote

```sas
footnote `asdfnkjsadfkjasdf`;
proc print data=work.test;
run;
```

## Clearing footnote

```sas
footnote ;
proc print data=work.test;
run;
```

## Options 

#### Removing date

```sas
options nodate;
proc print data=work.test;
run;
```

#### Removing page number

```sas
options nodate nonumber;
proc print data=work.test;
run;
```

#### Show page number and date

```sas
options date number;
proc print data=work.test;
run;
```

#### Start after a particular page number

```sas
options number pageno=100;
proc print data=work.test;
run;
```

Starts with the next page number after the one mentioned.

The code above start from page number 101

#### Page number error

```sas 
options number pageno=0;
proc print data=work.test;
run;
``` 

The code above gives error as the page number can not be zero. But why the fuck not?

以上是关于markdown SAS的全球声明的主要内容,如果未能解决你的问题,请参考以下文章

markdown SAS中的排序功能

markdown 在SAS中计算平均值

markdown SAS规则

markdown 在SAS中创建/导入数据

markdown 在SAS中打印

SAS:包括输出中的宏参考? [重复]