define_in

Input metadata used for generating DEFINE documentation by %definepdf.
 
%define_in (indata = input data,
                        outlib
= output libname,
                        undo
= undo import);
 

Where

Is Type...

And represents...

input data

C (200 chars)

Input data containing the metadata used for %definepdf.  This includes the full path and file name.  The file can be a SAS dataset such as _DEFINE or an excel spreadsheet. 

outlib

C (200 chars optional)

This is the location where the system will store the updated _DEFINE dataset.

undo

C (40 chars optional)

Undo the last import.  The _DEFINE dataset will return to its prior state before the last import.  Valid values include:

  • yes

  • no (default)

Details
The input data for this will update the existing _DEFINE dataset used to generate the domain documentation.  The input data has the following structure depending on the input type:

_DEFINE dataset
 

Variable

Type

Length

Label

path

Char

200

Library Path

datname

Char

200

Dataset Name

labname

Char

200

Dataset Label

variable

Char

32

Variable Name

label

Char

256

Variable Label

TYPE

Char

10

Type

length

Num

8

Length

format

Char

50

Format

fmtcode

Char

200

Decode/Formats

origins

Char

10

Origins

role

Char

4

Role

sortedby

Num

8

Sorted By

Excel Spreadsheet
 
Dataset NameVariable NameTypeLengthVariable LabelFormatDecode FormatsOriginsRoleComment
a_addtstahbcdtNumeric8Anti-HBc test dateDATE9 Source  
a_addtstahbcnaCharacter8NA check box for anti-HBc  Derived  
a_addtstahbcrCharacter25Anti-HBc test result  Derived  

If the updated input data contains less datasets than the existing, it would retain the other existing datasets.  For example, the updated input data only contains documentation to AE but the existing documentation already contains AE, DM and CM.  In this event, it will update the AE dataset while retaining the existing DM and CM.

If there exist a previous dataset _DEFINE, the tool will make a backup of this dataset in the SASUSER libname before it is overwritten.  This will allow users with the option to "undo" by copying back the SASUSER._DEFINE.

When the macro is called without any parameters, a graphical user interface (GUI) will be presented with the same options as the macro. 

Example

%define_in (data =c:\temp\_define.sas7bdat);

%define_in (data =c:\temp\_define.xls);

%define_in (data =c:\temp\_define.xls, outlib=mylib, undo=yes);  

 
    Definedoc - DEFINE.XML Software,  Meta-Xceed Inc.© 2009
Bookmark and Share