Transdata™ - trans

 

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...
indataCSource data set to be converted.  This is specified with a two level dot notation: libname.dataname
outdataCDestination data set that is converted.  This is specified with a two level dot notation: libname.dataname.  
outlabelC (optional)Output dataset label name.
modelCThis 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.
outputC (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.
dropC (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.
outputC (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
STUDYIDStudy Identifierlengthlength=$100
INVInvestigator Numbername, label, lengthINVID  label="Investigator Identifier"   length=$100
INVNAMEInvestigator Namename, label, lengthINVNAM  label="Investigator Name"   length=$100
USUBJIDUnique Subject Identifierlengthlength=$100
SUBJIDSubject Numberlabel, lengthlabel="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);

 
    Transdata - ETL CDISC Software,  Meta-Xceed Inc.© 2009
Bookmark and Share