Loading...
Searching...
No Matches
mpe_getlabels.sas File Reference

Gets the table and column labels for a particular table. More...

Go to the source code of this file.

Detailed Description

Builds a labels dataset by combining three inputs:

  • NAME - taken from source. This is typically a WORK subset of the underlying table (e.g. after column-level security has been applied) and dictates which columns appear in the output.
  • MEMLABEL / LABEL - taken from tgt_ds (the two-part libref.dataset). This ensures the "true" table and column labels are used rather than any that may have been stripped during WORK subsetting.
  • DD_SHORTDESC / DD_LONGDESC - taken from mpe_datadictionary where DD_SOURCE contains the LIB.DSN reference and DD_TYPE is COLUMN.

If tgt_ds is not supplied it defaults to source.

Parameters
[in]typeThe type of labels to fetch (only COLUMNS is currently supported).
[in]sourceThe dataset from which column NAMES are read.
[in]tgt_ds=(&source) The two-part libref.dataset from which the table/column LABELS are read, and used when joining to mpe_datadictionary for short/long descriptions.
[out]outds=(mpe_getlabels) The output dataset with columns name, memlabel, desc, longdesc.

SAS Macros

Version
9.2
Author
4GL Apps Ltd

Definition in file mpe_getlabels.sas.