Previous Page | Next Page

Maintaining Global Metadata

Host Definitions

A host definition is a metadata record that specifies a computer where data stores reside, where processes and Jobs execute, or where process output is sent. Host definitions are included in the metadata records for data stores, processes, and scheduling server definitions in the current Environment. They are required in order to access source data and to load warehouse data stores.


Preparing to Create Host Definitions

Here is one way to identify the host definitions you need for a given project:


Local and Remote Host Definitions

Host definitions include a Warehouse Jobs Are field. This field determines whether SAS/Warehouse Administrator will generate SAS/CONNECT statements for the object whose metadata includes the host definition. The possible values for this field are

Local to this Host

SAS/Warehouse Administrator generates code for the object as if it were local to SAS/Warehouse Administrator. (The code does not include SAS/CONNECT statements.)

Remote to this Host

SAS/Warehouse Administrator generates code for the object as if it were remote to SAS/Warehouse Administrator. (The code includes SAS/CONNECT statements.)

For example, suppose that you want SAS/Warehouse Administrator to generate code for a data store that resides on the SAS/Warehouse Administrator host. The metadata for this library would include a local host definition because SAS/CONNECT is not required to execute the code for this object.

To take another example, suppose that you want SAS/Warehouse Administrator to generate code to access a remote DBMS through a local SAS/ACCESS LIBNAME statement. The metadata for the SAS/ACCESS LIBNAME statement would include a local host definition because SAS/CONNECT is not required to execute a local SAS/ACCESS LIBNAME statement. (In this case, the DBMS is accessed as if it were a local SAS library, for the most part. The remote connection is handled transparently by the DBMS client software.)

On the other hand, suppose that you want SAS/Warehouse Administrator to generate code for a data store that resides on a host remote to SAS/Warehouse Administrator. The metadata for this object would include a remote host definition because SAS/CONNECT is required to access the remote host where the data store resides.


Example: Adding a Local Host Definition

This example summarizes how to add a local host definition--a host definition with a Local to this Host value in its Warehouse Jobs Are field. Typically, you will create a local host definition for each computer where SAS/Warehouse Administrator is installed. The appropriate Warehouse Environment is assumed to exist.


Define Host Properties

Display the Define Items Used Globally window, as described in Using the Define Items Used Globally Window.

In the Type panel of the Define Items Used Globally window, click the button beside Hosts. Click Add at the bottom left of the window. A Host Properties window for the host displays for you to enter the appropriate information as follows:

Name

specifies a display name for the host definition that you are creating.

[untitled graphic]

The Name field contains a display name that is appropriate for a local host: local . If your site has multiple SAS/Warehouse Administrator hosts, you might want to give each local host a different display name.

After you have entered a name (and perhaps a description), click the Locale tab. The fields on this tab are

Warehouse jobs are

specifies whether the host being defined is local or remote to SAS/Warehouse Administrator--for code generation purposes.

If you select Local to this host, when you incorporate this host definition in the metadata for a data store, process, or Job, SAS/Warehouse Administrator will generate code for that object as if it is local to SAS/Warehouse Administrator (the code will not include SAS/CONNECT statements).

[untitled graphic]

In the Warehouse jobs are field, the Local to this host option is selected.

After specifying values in this field, click OK. The new host definition is added to the list of hosts in the Define Items Used Globally window.


Example: Adding a Remote Host Definition

This example summarizes how to add a remote host definition--a host definition with a Remote to this Host value in its Warehouse Jobs Are field. Typically, you will create a remote host definition for each computer that is remote to SAS/Warehouse Administrator where a data store resides, where a process or Job will execute, or where a process will send its output--if SAS/Warehouse Administrator will generate code for that object.

The appropriate Warehouse Environment is assumed to exist.


Preparing to Create a Remote Host Definition

Before you create a remote host definition, gather the following information about the host:

Access method

Example: TCP/IP

Remote host ID

Example: unixone.mycompany.com

Remote User ID

Example: admindw

Remote Password

Example: addwmin

Remote SAS Version *

Example: SAS Version 6.12

* Keep in mind that a remote host definition is used to generate the code for a SAS/CONNECT session between two computers, one of which is the SAS/Warehouse Administrator host. Base SAS must be installed on both machines.

In addition to gathering the information above, you should also do the following tasks:


Define Host Properties

Display the Define Items Used Globally window, as described in Using the Define Items Used Globally Window.

In the Type panel of the Define Items Used Globally window, click the button beside Hosts. Click Add at the bottom left of the window. A Host Properties window for the host displays for you to enter the appropriate information as follows:

Name

specifies a display name for the host definition that you are creating.

[untitled graphic]

The Name field contains a display name that is appropriate for a remote UNIX host: unix1 .

After you have entered a name (and perhaps a description), click the Locale tab. The fields on this tab are

Warehouse jobs are

specifies whether the host being defined is local or remote to SAS/Warehouse Administrator--for code generation purposes.

If you select Remote to this host when you incorporate this host definition in the metadata for a data store, process, or Job, SAS/Warehouse Administrator will generate code for that object as though it were remote to SAS/Warehouse Administrator (the code will include SAS/CONNECT statements).

Remote ID

specifies the address needed to access the remote host--as appropriate for the access method you specify in the Access method field.

Access method

specifies the communications access method that you want to use to access this host.

SAS/CONNECT script

specifies the full pathname of the logon script for this host--if a script is required for your access method. For details about creating the SAS/CONNECT script that is referenced in this field, see Creating Scripts for Accessing Remote Hosts.

Userid

displays the user ID to be supplied to the script specified in the SAS/CONNECT script field. The user ID is entered from the window that is displayed when you click Set UserID/Password.

PW dataset

displays the encrypted password data set used to store the user ID and password to be supplied to the script specified in the SAS/CONNECT script field. The data set name (such as SASUSER.ENCRYPT) is entered from the window that is displayed when you click Set UserID /Password.

[untitled graphic]

In the Warehouse jobs are field, the Remote to this host option is selected.

In the Remote ID field, a domain name for the remote host is specified: unixone.mycompany.com . This is a name appropriate for the tcp (TCP/IP) protocol specified in the Access method field.

In the current example, the remote host has Release 6.12 of SAS installed. Accordingly, in the SAS/CONNECT script field, the full pathname for a script appropriate for Release 6.12 is specified: C:\toystore_1\_scripts\tcpunx_sas612.scr .

If the script specified in the SAS/CONNECT script field will not prompt for a user ID and password, or if you write your own code to provide the user ID and password to the script when it runs in batch mode, then you are finished with this host definition. Click OK. The new host definition is added to the list of hosts in the Define Items Used Globally window.

On the other hand, if the script specified in the SAS/CONNECT script field will prompt for a user ID and password, and you want SAS/Warehouse Administrator to supply them, then click Set UserID /Password to display the User ID/Password Specification window. The fields in this window are

Password dataset

specifies the encrypted data set where the user ID and password for the remote host are stored. The default is SASUSER.ENCRYPT. This data set must be accessible during batch jobs and interactive SAS/Warehouse Administrator sessions.

User ID

specifies the user ID needed to access the remote host. SAS/Warehouse Administrator stores the user ID and password in the encrypted data set that is specified in the Password dataset field.

Old Password

specifies a password that you want to use to access the remote host.

New Password

specifies the new password that you want to use to access the remote host.

Note:   The password that is specified in the User ID/Password Specification window cannot contain delimiters such as: . < ( + & ! $ * ) ; - / , % | .   [cautionend]

The password specified in this window will be read by a SAS macro function such as %qscan . These macro functions cannot read passwords with the delimiters listed above. If the password cannot be read, the remote host login script that requires this password might fail.

[untitled graphic]

In the User ID/Password Specification window, you specify the user ID and password that SAS/Warehouse Administrator will provide to the SAS/CONNECT script that is specified in the SAS/CONNECT script field on the Locale tab. You will also specify the data set where this information is stored.

In the Password dataset field, the default data set is selected: SASUSER.ENCRYPT .

To enter a new user ID and password for this host definition:

  1. Enter the user ID in the User ID field and press RETURN.

  2. Enter the password and press RETURN.

  3. Enter the password a second time to verify it and press RETURN.

  4. Click Add/Update to save the specified user ID and password in the password data set.

    Note:   You must click Add/Update ID to save the specified user ID and password in the password data set. Otherwise your changes will be lost, and the remote host login script that requires this user ID and password might fail.   [cautionend]

  5. Click Go Back.

    You will be returned to the Locale tab.

After adding security information through the User ID/Password Specification window, the Userid and PW dataset fields on the Locale tab are updated, as shown in the next display:

[untitled graphic]

Verify that the Userid and PW dataset fields reflect the entries made in the User ID/Password Specification window. If so, you are finished with this host definition.

Click OK. The new host definition is added to the list of hosts in the Define Items Used Globally window.


Additional Setup for Remote Hosts

If you have created any remote host definitions in the Host Properties window, you must do some additional setup tasks, or the connections specified in the remote host definitions might fail.


Creating Scripts for Accessing Remote Hosts

The metadata for a remote host definition includes a reference to a SAS/CONNECT script if a script is required for your access method. You can write your own scripts, or you can copy and modify the example scripts that are shipped with SAS/CONNECT software. The example scripts have an *.scr extension and are typically found in a subdirectory under the SAS/CONNECT directory.

Verify that the SAS/CONNECT script that is referenced by a host definition

Scripts for accessing remote hosts should be accessible from batch sessions as well as interactive sessions. Accordingly, they cannot prompt you for user ID and password information.

Usually, your script will prompt you for your user ID and password, using code such as the following:

input 'Userid?';
waitfor 'ENTER PASSWORD', 60 seconds : nolog;

input nodisplay 'Password?';

To allow the script to run in batch, you should replace this code with the following:

type "%qscan(%superq(xxxxsec),1,.)";
type LF;
waitfor 'ENTER PASSWORD', 60 seconds : nolog;

type "%qscan(%superq(xxxxsec),2,.)";
type LF;

In the previous code, xxxx is an abbreviation for the access method. For example, if you are using APPC, you would specify the string appcsec as the macro variable. If you are using TCP, you would specify the string tcpsec .

Note:   If you have created a remote host definition that includes user ID and password information stored in an encrypted data set, you must enable GETUSRPW macro support on the host where the login script runs, as described below.   [cautionend]


Setup Required for GETUSRPW Macro

SAS/Warehouse Administrator provides the macro GETUSRPW to retrieve the user ID and password from the encrypted data set specified on the User ID/Password Specification window. The main purpose of the macro GETUSRPW is to appropriately set the xxxxSEC macro variable (where xxxx is the access method) to USERID.PASSWORD.

If you specified a script in the SAS/Connect script field of the Host Properties window, and you had SAS/Warehouse Administrator generate the code to provide a user ID and password to the script, you must enable the GETUSRPW macro support on the platform where the script will run. For example, if you specified a script that will run on the same Windows NT machine where SAS/Warehouse Administrator is installed, you must enable the GETUSRPW macro support on that NT machine. Otherwise, if you specified a script that will run on a mainframe, you must enable the GETUSRPW macro support on that mainframe.

The following sections explain how to get the GETUSRPW macro to work on the appropriate platform.


GETUSRPW Support Local to SAS/Warehouse Administrator

For PC platforms, place the following code in your SAS autoexec file:

libname saswa '!sasroot\whouse\sashelp';
filename getusrpw catalog 'saswa.dwport';
options sasautos=(getusrpw sasautos);

For UNIX platforms, place the following code in your SAS autoexec file:

libname saswa '!sasroot/sashelp';
filename getusrpw catalog 'saswa.dwport';
options sasautos=(getusrpw sasautos);

Note:   The SASWA libref points to the location of SAS/Warehouse Administrator's DWPORT catalog. The example above shows the default location. If you install SASWA somewhere other than the default location, you should make the changes appropriately.  [cautionend]

Restart SAS with the new SAS autoexec file.


GETUSRPW Support Remote to SAS/Warehouse Administrator

Create a SAS Data library on the target platform where you need GETUSRPW support. The location of the library can be whatever you choose. This will be the location of the GETUSRPW components.

Allocate the SAS Data library with a library reference (libref) of SASWA.

Upload the following catalog entries from the platform where SAS/Warehouse Administrator is installed to the target platform where GETUSRPW support is needed: ENCDEC.CLASS, ENCPWUSR.CLASS, ENCDEC.SCL, ENCPWUSR.SCL, GETUSRPW.SCL, GETUSRPW.SOURCE.

Also, you will need to move the ENCRYPT data set to the target platform. The GETUSRPW.SOURCE entry assumes that this data set is named SASUSER.ENCRYPT. If you give it a different name, you will need to update the GETUSRPW.SOURCE entry.

Here is sample code for uploading to OS/390 (MVS) (with a new allocation of the SASWA library):

options remote=sdcmvs;
filename rlink '!SASROOT\connect\saslink\tcptso.scr';
signon;

rsubmit;
libname saswa 'library name' disp=(new,catlg) space=(cyl,(3,1));
proc upload incat=sashelp.dwport outcat=saswa.dwport status=no;
  select
   ENCDEC.CLASS
   ENCPWUSR.CLASS
   ENCDEC.SCL
   ENCPWUSR.SCL
   GETUSRPW.SCL
   GETUSRPW.SOURCE;

  proc upload in=sasuser out=sasuser status=no;
    select encrypt;
  run;
endrsubmit;
signoff;

Make the GETUSRPW macro available to remote Jobs. The best way to do this is by making GETUSRPW.SOURCE a part of the Autocall Macro Facility search path. The search path is defined by the SAS option SASAUTOS. Here are two examples: one for Release 6.11 of SAS and later, the other for Release 6.09 of SAS (MVS, CMS).

For Release 6.11 of SAS and later, add the following to your SAS autoexec file:

libname saswa 'user defined location';
filename getusrpw catalog 'saswa.dwport';
options sasautos=(getusrpw sasautos);

For Release 6.09 of SAS (MVS, CMS), start Interactive SAS, use the LIBNAME statement to allocate the libref SASWA to point to the library that you created. On the SAS command line, type copy saswa.dwport.getusrpw.source .

Save the contents of the program editor to a PDS member on OS/390 (MVS) or a maclib on CMS with the name of getusrpw . Here is an example of the FILE command on OS/390 (MVS):

file 'userid.my.pds(getusrpw)'

Add the following to your SAS autoexec file:

libname saswa 'user defined location';
filename getusrpw 'PDS or Maclib name';
options sasautos=(getusrpw sasautos);

Note:   The libref SASWA should point to the library created in the first step of the process that contains the macro GETUSRPW components.  [cautionend]

Make sure that each invocation of SAS points to this new SAS autoexec file.

Previous Page | Next Page | Top of Page