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.

The DATASETS Procedure 4 Procedure Execution 353<br />

Concepts: DATASETS Procedure<br />

Procedure Execution<br />

Execution of Statements<br />

When you start the DATASETS procedure, you specify the procedure input library in<br />

the PROC DATASETS statement. If you omit a procedure input library, the procedure<br />

processes the current default <strong>SAS</strong> data library (usually the WORK data library). To<br />

specify a new procedure input library, issue the DATASETS procedure again.<br />

Statements execute in the order they are written. For example, if you want to see<br />

the contents of a data set, copy a data set, and then visually compare the contents of<br />

the second data set with the first, the statements that perform those tasks must appear<br />

in that order (that is, CONTENTS, COPY, CONTENTS).<br />

RUN-Group Processing<br />

PROC DATASETS supports RUN-group processing. RUN-group processing enables<br />

you to submit RUN groups without ending the procedure.<br />

The DATASETS procedure supports four types of RUN groups. Each RUN group is<br />

defined by the statements that compose it and by what causes it to execute.<br />

Some statements in PROC DATASETS act as implied RUN statements because they<br />

cause the RUN group preceding them to execute.<br />

The following list discusses what statements compose a RUN group and what causes<br />

each RUN group to execute:<br />

3 The PROC DATASETS statement always executes immediately. No other<br />

statement is necessary to cause the PROC DATASETS statement to execute.<br />

Therefore, the PROC DATASETS statement alone is a RUN group.<br />

3 The MODIFY statement, and any of its subordinate statements, form a RUN<br />

group. These RUN groups always execute immediately. No other statement is<br />

necessary to cause a MODIFY RUN group to execute.<br />

3 The APPEND, CONTENTS, and COPY statements (including EXCLUDE and<br />

SELECT, if present), form their own separate RUN groups. Every APPEND<br />

statement forms a single-statement RUN group; every CONTENTS statement<br />

forms a single-statement RUN group; and every COPY step forms a RUN group.<br />

Any other statement in the procedure, except those that are subordinate to either<br />

the COPY or MODIFY statement, causes the RUN group to execute.<br />

3 One or more of the following statements form a RUN group:<br />

3 AGE<br />

3 CHANGE<br />

3 DELETE<br />

3 EXCHANGE<br />

3 REPAIR<br />

3 SAVE<br />

If any of these statements appear in sequence in the PROC step, the sequence<br />

forms a RUN group. For example, if a REPAIR statement appears immediately<br />

after a SAVE statement, the REPAIR statement does not force the SAVE

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

Saved successfully!

Ooh no, something went wrong!