Previous Page | Next Page

SAS/ACCESS Interface to DB2 Under z/OS

ACCESS Procedure Specifics for DB2 Under z/OS


Key Information

See ACCESS Procedure for general information about this feature. DB2 under z/OS examples are available.

SAS/ACCESS Interface to DB2 under z/OS supports all ACCESS procedure statements in interactive line, noninteractive, and batch modes. Here are the ACCESS procedure specifics for the DB2 under z/OS interface.


Examples

This example creates an access descriptor and a view descriptor that are based on DB2 data.

options linesize=80;
libname adlib 'SAS-data-library';
libname vlib 'SAS-data-library';

proc access dbms=db2;

   /* create access descriptor  */
   create adlib.customr.access;
   table=testid.customers;
   ssid=db2;
   assign=yes;
   rename customer=custnum;
   format firstorder date7.;
   list all;

   /* create vlib.usacust view */
   create vlib.usacust.view;
   select customer state zipcode name
          firstorder;
   subset where customer like '1%';
run;

This next example uses the SERVER= statement to access the SQL/DS table Testid.Orders from a remote location. Access and view descriptors are then created based on the table.

libname adlib 'SAS-data-library';
libname vlib 'SAS-data-library';

proc access dbms=db2;
  create adlib.customr.access;
  table=testid.orders;
  server=testserver;
  assign=yes;
  list all;

 create vlib.allord.view;
  select ordernum stocknum shipto dateorderd;

    subset where stocknum = 1279;
run;

Previous Page | Next Page | Top of Page