Hello, everyone
I need to pull out a detailed coding data dictionary from my database. I tried proc contents and proc sql dictionary.tables. However, I only get a broad data dictionary. I want to know is there a way I can find a detailed coding dictionary? For example: there are numeric number 1-99 in the column TYPE in my table A. I want to know what does each number represent? I am very appreicate for any suggestions.
There is not automatic tables for what you describe (if understand you correctly).
To find what values are stored in a certain column/variable, you need to query the table itself. Of the columns is indexed, you can get min/max values from the metadata (dictionary/contents etc).
What code values represent - that's a design and documentations issue. Again, no automatic function in SAS.
Sometimes the information that translates your codes 1-99 is stored in a format that is assigned to a variable. You can print the contents of a format by adding the FMTLIB option to PROC FORMAT. However, that same format may be applied to many variables, not just one. The format is connected to the data by adding a FORMAT statement to a DATA step, and the translations are not considered a permanent part of the data.
Thanks everyone for your replying. My database has more than 500 tables. We do not have a detailed data dictionary. I could enter the database as a front user to check for each table and find out the code. However, this is not an efficient way. Thank you for your input and the useful informaton.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.