Step 2: Set the Metadata System Options and a Macro Variable

This example uses metadata system options and a macro variable to set site-specific data. This is a good programming technique that makes it easy for you to customize SAS code for your environment.
Note: For more information about macro variables or the %LET statement, see the SAS Macro Language: Reference.
The following code defines a macro variable for the information map location and sets system options for the connection to the server:
/* Use traditional listing output. */
ods html close;
ods listing;

/* Assign a macro variable to store the path to the folder */
/* that contains information maps (to avoid having to set  */
/* the path multiple times).                               */
%LET infomap_path=/Shared Data/Infomap Example;

/* Set system options for connecting to the metadata server. */
options metauser="your-user-ID"
        metapass="your-password"
        metaserver="your-server-name"
        metaport=8561;
Setting the Metadata System Options and the Macro Variable
1    /* Use traditional listing output. */
2    ods html close;
3    ods listing;
4
5    /* Assign a macro variable to store the path to the folder */
6    /* that contains information maps (to avoid having to set  */
7    /* the path multiple times).                               */
8    %LET infomap_path=/Shared Data/Infomap Example;
9
10   /* Set system options for connecting to the metadata server. */
11   options metauser="myUserID"
12           metapass=XXXXXXXX
13           metaserver="myserver.mycompany.com"
14           metaport=8561;