Previous PageNext Page

OUTPUT Statement

OUTPUT (data step statement)
OUTPUT [libref1.dataset1 ... librefn.datasetn];

The data set(s) listed in the OUTPUT statement must match the name(s) of the data set(s) in the DATA statement, including the library reference (first name), if any. If no data set names are listed in the OUTPUT statement, then the PDV is written to every data set listed in the DATA statement.

Note: If no OUTPUT statement appears in a data step, then there is an implied OUTPUT statement at the end of the step. If you explicitly place an OUTPUT statement in your program, the implicit statement at the end will not be there.

Be careful, if two or more OUTPUT statements are in the data step, the PDV could be written twice to the same data set. Use conditional statements to control what is written to each data set.

Previous PageTable Of ContentsNext Page