![]() |
PING
0.9
Statistical data handling and processing in production environment
|
Create a working copy of a given dataset.
idsn : a dataset reference;groupby, where, having : (option) expressions used to refine the selection when mirror=COPY, like in a SELECT statement of PROC SQL (GROUP BY, WHERE, HAVING clauses); these options are therefore incompatible with mirror=LIKE; note that where and having should be passed with %quote; see also %ds_select; default: empty;mirror : (option) type of copy operation used for creating the working dataset, i.e. either an actual copy of the table (mirror=COPY) or simply a copy of its structure (i.e., the output table is shaped like the input ones, with same variables: mirror=LIKE); default: mirror=COPY;ilib : (option) name of the input library; by default: empty, i.e. WORK is used.odsn : name of the output dataset (in WORK library) where a copy of the original dataset or its structure is stored;olib : (option) name of the output library; by default: empty, i.e. WORK is used.For instance, we can run:
so as to retrieve:
See %_example_ds_copy for more examples.
The command ds_copy(idsn, odsn, mirror=COPY, ilib=ilib, olib=olib) consists in running:
while the command ds_copy(idsn, odsn, mirror=LIKE, ilib=ilib, olib=olib) is equivalent to: