ordervar

Modifies the position order of the variables for a specified dataset by key and alphabetical order

%ordervar (data=dataset name,
                       rdomain =
related domain,
                       key1-key10 =
key variables,
                       basecode =
SAS/Base Code);

 

Where

Is Type...

And represents...

dataset nameC (200)The name of the dataset to be ordered including the libname.  This uses the dot notation such as libname.dataset.  If only the dataset name is given, the work area is implied.
rdomain C (200 Optional) Related domain abbreviation to the current dataset.  Some valid domain names include:

AE Adverse Events
AU Autopsy Findings
BM Bone Mineral Density (BMD) Data Findings
BR Biopsy Findings
CM Concomitant Meds Interventions
CO Comments Special Purpose
CP Compliance Findings
DC Disease Characteristics Findings
DM Demographics Special Purpose
DR Disease Response Findings
DS Disposition Events
DV Protocol Deviations Findings
DY Diary Data Findings
EE EEG Findings
EG ECG Findings
EX Exposure Interventions
FH Family History Events
HU Healthcare Resource Utilization Findings
IE Inclusion / Exclusion Findings
IM Imaging Findings
LB Laboratory Data Findings
MB Microbiology Findings
MH Medical History Events
ML Meal Data Interventions
NE Neurological Exam Findings
OM Organ Measurements Findings
PC PK Concentration Findings
PE Physical Exam Findings
PP PK Parameters Findings
QS Questionnaires Findings
SC Subject Characteristics Findings
SE Subject Elements Study Design
SG Surgery Interventions
SK Skin Test Findings
SL Sleep (Polysomnography) Data Findings
SS Signs and Symptoms Findings or Events
ST Stress (Exercise) Test Data Findings
SU Substance Use Interventions
SV Subject Visits Trial Design
TA Trial Arms Trial Design
TE Trial Elements Trial Design
TI Trial Inclusion/Exclusion Criteria Trial Design
TV Trial Visits Trial Design
VS Vital Signs Findings

NOTE: Only the first two characters is needed to be specified in this parameter.

basecode C (200 optional) Saved location of SAS Base code that is used to create the relational records dataset.
key variablesC (optional)Assign specified variables to be keys.  The key variables will appear at the top before the sorting is applied.

Details
This tool modifies the position attributes of all the variables within a specified dataset.  The sorting order is by:

  • Key fields and their associated order
  • Alphabetical order by variable name

The newly updated dataset will have the same name containing the same variables.  The only change is in the position attribute of each variable.  If a wild card is specified with an asterisk such as in:

    mylib.*

All the dataset specified within that library will be ordered.

The transport file will look for the file extension (.xpt).  This file extension is not needed in the data parameter.

Some of the error conditions that ordervar will check for includes: 

  1. The data parameter is required.  
  2. The library name and data specified exist.
  3. If specified, the file type can only be "SAS Data" or "Transport".  Casing is not significant.
  4. Key variables specified must exist in the specified dataset(s).

The basecode parameter will generate SAS/BASE code that will perform the same task of ordering variables into selected dataset. 

If the DOMAIN variable is missing, this program will also add the domain abbreviation variable as selected from the related domain parameter.

Example

libname inlib '/my/study/directory';
%ordervar(data=inlib.a_ae);

%ordervar(data=inlib.*, key1=subjid);

%ordervar(data=inlib.a_demog, key1=subjid);
 

    CDISC Builder - CDISC Data Tools Software,  Meta-Xceed Inc.© 2009
Bookmark and Share