Transfer the data model to a new structure as specified by a
specification. %trans (indata = input data set,
outdata = output data set,
outlabel = output label,
model = transfer model data set,
output = output program,
, drop = drop missing);
Where |
Is
Type... | And
represents... |
indata | C | Source data set to be converted. This
is specified with a two level dot notation: libname.dataname |
outdata | C | Destination data set that is converted.
This is specified with a two level dot notation: libname.dataname. |
outlabel | C (optional) | Output dataset label name. |
model | C | This specifies the transformation that needs
to be applied. This is in the format of having the following
columns:
- Variable - The original variable name from the source dataset.
- Transformation_Type - This specifies the type of
transformation that is applied. Sample types include:
- name - variable name change
- label - variable label change
- length - variable length change
- new - a new variable created. All attributes should
be listed.
- same - the same variable created with all the same
attribute.
- transpose - Variables will be transposed to the new
variable specified
- Update_to - This contains attributes that needs to be
updated. This is the same information that goes into the
attrib statement. In case of transpose, the update_to will
specify the name of the new variable.
|
output | C (optional) | Name of the output SAS program. This
contains the name of the SAS program that contains the logic of the
transposition. If this were left blank, the program will be
saved to the current directory with the name indata_outdata.sas where
the indata and outdata contains just the name of the dataset. |
drop | C (optional) | This specifies the transformation that drops
missing values. This contains Yes or No. If this were
left blank, the default values will be No.
|
output | C (optional) | Name of the output SAS program. This
contains the name of the SAS program that contains the logic of the
program. If this were left blank, the program will be
saved to the current directory with the name join.sas.
|
Details The transformation tool expects the
transformation model to be specified with certain information. An
example of such model would look like:
Variable |
Label |
Transformation
Type |
Update
To |
STUDYID | Study Identifier | length | length=$100 |
INV | Investigator Number | name, label, length | INVID label="Investigator
Identifier" length=$100 |
INVNAME | Investigator Name | name, label, length | INVNAM label="Investigator
Name" length=$100 |
USUBJID | Unique Subject Identifier | length | length=$100 |
SUBJID | Subject Number | label, length | label="Subject Identifier for the Study"
length=$100 | Some of the requirements and error checking that occurs for the input
parameters include:
- indata - is a valid data set that is available to be read.
- outdata - is a valid data set that is available for update.
- label - is a valid SAS label under 40 characters.
- model
- A data set that is available for read access.
- Contains required fields of: variable, transformation_type and
update_to
- The transformation contains valid types including: name, label, length, new, same, transpose.
Example
%trans (indata = inlib.adverse,
outdata = outlib.ae,
outlabel= Adverse Event,
model = work.trans,
output = work.trans,
drop = c:\temp\test.sas); |