ACCESS Procedure Specifics for SAP ASE

Overview

For general information about this feature, see the ACCESS Procedure.

SAS/ACCESS for SAP ASE supports all ACCESS procedure statements.

Here are the ACCESS Procedure specifics for SAP ASE.

Note: SAS still supports this legacy procedure. However, to access your DBMS data more directly the best practice is to use the LIBNAME statement for SAP ASE or the SQL pass-through facility. For more information, see LIBNAME Statement for the SAP ASE Engine and SQL Pass-Through Facility Specifics for SAP ASE.

PROC ACCESS Example for SAP ASE

The following example creates access descriptors and view descriptors for the EMPLOYEES and INVOICE tables. These tables have different owners and are stored in PERSONNEL and INVENTORY databases that reside on different machines. The USER= and PASSWORD= statements identify the owners of the SAP ASE tables and their passwords.

libname vlib 'sas-library';

proc access dbms=sapase;
   create work.employee.access;
      server='mysrv1'; database='personnel';
      user='myusr1'; password='mypwd1';
      table=EMPLOYEES;
   create vlib.emp_acc.view;
      select all;
      format empid 6.;
      subset where DEPT like 'ACC%';
run;

proc access dbms=sapase;
   create work.invoice.access;
      server='mysrv2'; database='inventory';
      user='myusr2'; password='mypwd2';
      table=INVOICE;
      rename invoicenum=invnum;
      format invoicenum 6. billedon date9.
        paidon date9.;
   create vlib.sainv.view;
      select all;
      subset where COUNTRY in ('Argentina','Brazil');
run;

options linesize=120;
title 'South American Invoices and
        Who Submitted Them';

proc sql;
   select invnum, country, billedon, paidon,
         billedby, lastname, firstnam
      from vlib.emp_acc, vlib.sainv
      where emp_acc.empid=sainv.billedby;

SAP ASE is a case-sensitive database. The PROC ACCESS database identification statements and the SAP ASE column names in all statements except SUBSET are converted to uppercase unless the names are enclosed in quotation marks. The SUBSET statements are passed to SAP ASE exactly as you enter them, so you must use the correct case for the SAP ASE column names.

Last updated: February 3, 2026