SAS® Metadata/Dictionary Tables    

Below are a collection of dictionary table SAS® papers.  Along with the DEFINE.XML file to view variable attributes, it may also be useful to create a multi-sheet excel of all datasets and CODEBOOK to characterize data.  

See Pharmaceutical programming section for example of applying variable attributes from an excel file.  See SAS Dictionary Tables Gallery.  See also Proc ContentsProc FREQExcel filesProc SQL and SAS Macro Programming.  SAS® Savvy ClassAutomating Tasks using SAS Macro and Metadata Programming


 Dictionary/Array Reference Functions Result 
See SAS Paper, SAS Paper 2

 
CALL LABEL ROUTINE

Assign label to variable

 

VLABEL()

Returns the variable's label

Example, Y=VLABEL(X); or Y=VARLABEL(X);

 

VLENGTH()

Returns the length of the string or numeric value from a character or numeric variable
 VNAME() Returns the variable's name, argument is often arrary index reference  See also INDEX("&VAR", 'END') > 0 to compare variable names 

VTYPE()
Returns the variable's type (N, C)

 VVALUE() Returns the formatted value

Download var_def macro [See also ODS and DEFINE.PDF]


* Most common to view list of variables and attributes in selected datasets;

PROC SQL;

 CREATE TABLE SKELETON_VARS AS 

 SELECT UNIQUE libname, memname, name, type, length, label, format

 FROM SASHELP.VCOLUMN  

 WHERE upcase(libname) = 'LEXLIB' and upcase(memname) = '_SKELETON_'; 

QUIT;

______________________________________________

 Beginner SAS Programmer

 

Beginner Paper SAS DICTIONARY: Step by Step, Patrick Thornton

 Advanced SAS Programmer


Advanced Paper The Design and Use of Metadata: Part Fine Art, Part Black Art, Frank DiIorio

 Macro SAS Programmer


Application Paper Considerations for Building an Integrated Safety Database Using SAS, Denise J. Smith, Daniel Schulz, Gayle Kloss, Wei Cheng

CODEBOOK: Taking Another Look At Your Data, Greg Silva Download SAS macro [Macro]

UNC CODEBOOK [Macro]

SASHELP Presentation

______________________________________________

1. A Quick and Easy Data Dictionary Macro, Pete Lund [Codebook]

2. Data About Data: An Introduction to Dictionary Tables, Frank C. Dilorio

3. Using Metadata for Data Driven Programming, Brian Varney

4. Meta Data That You (Probably) Didn’t Know That You Had: A Beginners’ Guide to Using SAS Dictionaries and Automatic Macro Variables, Richard F. Pless [&syslibrc, &sysfilrc]

5. Dictionary Tables and Views: Essential Tools for Serious Applications, Frank DiIorio, Jeff Abolafia

6. How Are All of these Tables Related? - Relational Database Map RDB_MAP.SAS, Eric Losby

7. Using Dictionary Tables to Explore SAS® Datasets, Phillip Julian

8. A Metadata Driven Programming Technique using SAS®, Xiyun Cheryl Wang

9. SQL Metadata Applications: I Hate Typing, Hannah Fresques

10. Give me EVERYTHING! A macro to combine the CONTENTS procedure output
and formats, Lynn Mullins
 [Variable Definition Table with formats, Macro, Codebook]

11. A Simple Way to Create a Clinical Trial Study Data. Dictionary, Frank Llu

12. Utilizing the VNAME SAS® function in restructuring data files, Mirjana Stojanovic, Donna Niedzwiecki

13. How to Create Data-Driven Lists, Kate Burnett-Isaacs

14. Accessing SAS metadata and using it to help us develop data-driven SAS programs, Iain Humphreys [HOW Examples]

15. Metadata integrated programming, Jesper Zeth, Jan Skowronski [HOW Examples]


16. Creating ''Variable Name" Data Sets With CALL VNAME and PROC TRANSPOSE, David Swift

17. Metadata Management – Building Blocks [HOW Examples]

18. ‘V’ for … Variable Information Functions to the Rescue, Richann Watson, Karl Miller

19. astraZENeca and the ART of metadata maintenance, Paul Frost [Presentation]

20. How Do I Look it Up If I Cannot Spell It: An Introduction to SAS Dictionary Tables, Peter Eberhardt, Ilene Brill

21. Utilizing SAS® Functions to Access Variable Information, Joleen Borgerding, Akiko Chai

22. Techniques for Generating Dynamic Code from SAS® DICTIONARY Data, Jingxian Zhang

23. METADATA APPLICATION ON CLINICAL TRIAL DATA IN DRUG DEVELOPMENT, Julia Zhang, David Chen, Tor-Lai Wong

24. Metadata-driven Tool for Creation of a Dataset for Exploratory Analyses, Alexey Kuznetsov

25. Accessing SAS metadata and using it to help us develop data-driven SAS programs,Iain Humphreys [Macros]

26. Comparing dataset metadata, Jim Groeneveld

27. Comparing 6 Techniques To Do Data Driven Programming, Joris Derks [Presentation]

28. SAS Programming Techniques for Manipulating Metadata on the Database Level Chris Speck [HOW Examples]

29. Writing Data Quality rules using SAS Meta-programming, Shreyas Dalvi [Poster, Metadata Dataset]

30. PROC CATALOG, the Wish Book SAS® Procedure, Louise Hadden

31. Additional Metadata for Common Catalog Entry Types, Kenneth Borowiak

32. A Lightweight HTML Codebook Generator for Clinical Trial Data, Lei Zhang

33. SAS Rule-Based Codebook Generation for Exploratory Data Analysis, Ross Bettinger

34. A Comprehensive Codebook Generator, Naoko Stearns, John Gerlach [Macros]

35. General Use Data Delivery Codebook/Data Dictionary, Donna Medeiros, Nick Kinsey, Margo Brinkley

36. An Integrated Approach to Codebook Generation using SAS [Presentation]

37. PROC DOC III: Self-generating Codebooks Using SAS, Louise Hadden

38. An Efficient Method to Create a Large and Comprehensive Codebook, Wen Song, Kamya Khanna, Baibai Chen

39. A Software Toolkit for Data Management, Kim Chantala, Jean Robinson, and Helen Smith [Proc Codebook, Macros, Presentation]


40. SAS Tools for Program Automation, Richard Pless

41. Building Metadata Repository for Data Sets, Haining Luo, Haiping Luo

42. Metadata, Macros, and Documenting SAS® Programs, Patrick Thornton

43. What's in a SAS Variable? Get Answers with a V!, William Murphy

44. Create a SAS Program that Can Read the Contents of a Directory, Ben Cochran [DOPEN(), DNUM(), DREAD(), DCLOSE()]

45. Organize and Manage Files by SAS® Programming Weibo Wang, Heyang Li

46. Automatic Statistical Association Analyses Using SAS Macro Programs, Justin Jia, Amanda Lin

47. A Non-Invasive Macro to Track Submission Metadata in SAS Drug Development, Katrina Canonizado, Bradford Danner, Matthew Wiedel

48. Where, When, and How to Use Dictionary Tables in SAS, Jiang Jin

49. Simple Ways to Use PROC SQL and SAS DICTIONARY TABLES to Verify Data Structure of the Electronic Submission Data Sets, Christine Teng, Wenjie Wang [QA macros]


50. Document and Enhance Your SAS® Code, Data Sets, and Catalogs with SAS Functions, Macros, and SAS Metadata

51. Creating Case Report Tabulations (CRTs) for an NDA Electronic Submission to the FDA, Anita Rocha, Paul Hamilton

52. Efficiency Comes From Reusability and Repeatability, Hanming Tu, Dave Evans [Automation, Metadata]


53. Metadata 101: A Beginner's Guide to Table-Driven Applications Programming, Frank DiIorio

54. Coding For the Long Haul With Managed Metadata and Process Parameters, Mike Molter

55. A Macro that can Search and Replace String in your SAS Programs Ting Sa

56. Copy That! Using SAS® to Create Directories and Duplicate Files, Nicole Ciaccia [Presentation]

57. Obtaining A List of Files In A Directory Using SAS® Functions, Jack Hamilton

58. Writing Code With Your Data: Basics of Data-Driven Programming Techniques, Joe Matise

59. The Many Use Cases of Standardized Data and Metadata, Sanjiv Ramalingam

60. ADaM mapping - key considerations for a metadata driven realization, Elena Glathe [Presentation]

Powered by Wild Apricot Membership Software