Previous Topic: 4.4.1 SAS Call Routine GBLFCN

Next Topic: 4.5 User-defined Informats and Formats

4.4.2 SAS Function and Call Routine MALABEL


Name:            MALABEL

Abstract:        Provides dynamic access to the value of a
                 label assigned to a SAS variable.

External
Specifications:  CALL MALABEL(value, name); /*Call Routine */
                    -or-
                 value=MALABEL(name);       /*Function     */

    The variables value and name are character variables
    defined as follows:

    value - a 1- to 200-character variable that contains the
            value of the label associated with SAS variable
            whose name is in "name".

    name  - variable containing the 8-character name of a SAS
            variable.

Sample usage:

               data _null_;
                 ...
                 length VARLABEL $40 VARNAME $8;
                 retain VARLABEL VARNAME ' ';
                 label ASID = 'Address Space Identification';
                 VARNAME='ASID';
                 call MALABEL(VARLABEL, VARNAME);
                 put VARLABEL=;
               run;

    The following would be printed on the SAS log:

       VARLABEL=Address Space Identification