29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

308 AGE Statement 4 Chapter 15<br />

AGE Statement<br />

Renames a group of related <strong>SAS</strong> files in a library.<br />

Featured in: Example 6 on page 385<br />

AGE current-name related-<strong>SAS</strong>-file(s)<br />

;<br />

Required Arguments<br />

current-name<br />

is a <strong>SAS</strong> file that the procedure renames. current-name receives the name of the first<br />

name in related-<strong>SAS</strong>-file(s).<br />

related-<strong>SAS</strong>-file(s)<br />

is one or more <strong>SAS</strong> files in the <strong>SAS</strong> data library.<br />

Options<br />

ALTER=alter-password<br />

provides the alter password for any alter-protected <strong>SAS</strong> files named in the AGE<br />

statement. Because an AGE statement renames and deletes <strong>SAS</strong> files, you need alter<br />

access to use the AGE statement. You can use the option either in parentheses after<br />

the name of each <strong>SAS</strong> file or after a forward slash.<br />

See also: “Using Passwords with the DATASETS Procedure” on page 355<br />

MEMTYPE=mtype<br />

restricts processing to one member type. All of the <strong>SAS</strong> files that you name in the<br />

AGE statement must be the same member type. You can use the option either in<br />

parentheses after the name of each <strong>SAS</strong> file or after a forward slash.<br />

Aliases: MTYPE=, MT=<br />

Default: If you do not specify MEMTYPE= in the PROC DATASETS statement, the<br />

default is DATA.<br />

See also: “Restricting Member Types for Processing” on page 356<br />

Details<br />

3 The AGE statement renames current-name to the name of the first name in<br />

related-<strong>SAS</strong>-file(s), renames the first name in related-<strong>SAS</strong>-file(s) to the second<br />

name in related-<strong>SAS</strong>-file(s), and so on until it changes the name of the next-to-last<br />

<strong>SAS</strong> file in related-<strong>SAS</strong>-file(s) to the last name in related-<strong>SAS</strong>-file(s). The AGE<br />

statement then deletes the last file in related-<strong>SAS</strong>-file(s).<br />

3 If the first <strong>SAS</strong> file named in the AGE statement does not exist in the <strong>SAS</strong> data<br />

library, PROC DATASETS stops processing the RUN group containing the AGE<br />

statement and issues an error message. The AGE statement does not age any of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!