Previous Page | Next Page

Using the LIBNAME Statement for SAP

Examples


Example 1: Accessing the SAP Server From a Local Host

In this example for the z/OS operating environment, the SAS RFC server has been started on the local host on port 6998. You want to access the SAP System on sapr3srv.sup.com. The system number for the system is 03. You specify the entire set of user information, for example, client, user, password, and language.

libname mylib r3 user=TEST password=MYPASS client=800 language=EN
     ashost=sapr3srv.sup.com sysnr=03
     host=localhost port=6998;

Note:   If the SAS RFC server has been started on the SAS system host on port 6999, you do not need to define the host or port because 6999 is the default.   [cautionend]


Example 2: Changing the User Logon Language

You want to access the BW system on whjapp01 and the system number is 06. This time you want to log on using the German language. If you log on using that language, the column labels will all be in German.

libname bwides r3 user=Test password=pwd client=800 language=DE
    ashost=whjapp01 sysnr=06; 


Example 3: Defining an SAP Destination from the SAP Logon Utility

The SAP System you want to access is defined as SI9 in the SAP logon utility.

libname mylib r3 user=test password=secret client=800 language=E
    saplogon_id=SI9;


Example 4: Defining an SAP Destination from the saprfc.ini File

The SAP System you want to access is defined by the logical destination bwides in the file saprfc.ini.

  libname mylib r3 user=test password=secret client=800 language=EN
    destination=bwides; 


Example 5: Accessing the SAP Server With Credentials Stored in Metadata

User name and password credentials for the SAP System you want to access are stored in metadata. The credentials are associated with an authentication domain named SAPAuth. The SAS Metadata Server is named meta.sup.com.

options metaserver=meta.sup.com metauser=test metapass=secret;
libname bwides r3 authdomain=SAPAuth client=800
    language=EN ashost=sapr3srv.sup.com sysnr=03;

Previous Page | Next Page | Top of Page