Search notes:

SAS: dictionary.columns

Describe

proc sql;
  describe table dictionary.columns;
quit;

/*

create table DICTIONARY.COLUMNS
  (
   libname char(8) label='Library Name',
   memname char(32) label='Member Name',
   memtype char(8) label='Member Type',
   name char(32) label='Column Name',
   type char(4) label='Column Type',
   length num label='Column Length',
   npos num label='Column Position',
   varnum num label='Column Number in Table',
   label char(256) label='Column Label',
   format char(49) label='Column Format',
   informat char(49) label='Column Informat',
   idxusage char(9) label='Column Index Type',
   sortedby num label='Order in Key Sequence',
   xtype char(12) label='Extended Type',
   notnull char(3) label='Not NULL?',
   precision num label='Precision',
   scale num label='Scale',
   transcode char(3) label='Transcoded?'
  );


*/
Github repository about-SAS, path: /programming/dictionary/columns/describe.sas

Show variables of a library member

The following SQL statement shows the variables (columns) of a library member:
proc sql;
  select
    name,      /* Column name */
    type,      /* Column type */
    length,
    npos,
    varnum,    /* Column number in table */
    label
  from
    dictionary.columns
  where
    libname = 'TQ84_LIB' and
    memname = 'TQ84_MEMBER'
  order by
    varnum;
quit;
Github repository about-SAS, path: /programming/dictionary/columns/show.sas
See also Determining the columns (variables) in a data set.

sashelp.vcolumn

The corrspsonding sashelp view is sashelp.vcolumn.

See also

dictionary tables
dictionary.referential_constraints

Index