DBLOAD Procedure Specifics for Sybase

Overview

For general information about this feature, see DBLOAD Procedure. A Sybase example is available.
The Sybase interface supports all DBLOAD procedure statements. Here are the Sybase interface specifics for the DBLOAD procedure.
  • The DBMS= value for PROC DBLOAD is SYBASE.
  • The TABLE= statement for PROC DBLOAD is:
    TABLE= <'>table-name<'>;
  • PROC DBLOAD uses these database-description-statements.
    USER=<'>SYBASE-user-name<'>
    specifies the Sybase user name (also called the login name) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
    PASSWORD=<'>SYBASE-password<'>
    specifies the password that is associated with the Sybase user name.
    If you omit the password, a default password of NULL is used. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
    PASSWORD= can also be specified with the SYBPW=, PASS=, and PW= aliases.
    DATABASE=<'>database-name<'>
    specifies the name of the Sybase database that contains the tables and views that you want to access.
    If the database name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks. If you omit DATABASE=, the default database for your Sybase user name is used.
    Alias: DB=
    SERVER=<'>server-name<'>
    specifies the server that you want to connect to. This server accesses the database that contains the tables and views that you want to access.
    If the server name contains lowercase, spaces, or nonalphanumeric characters, you must enclose it in quotation marks.
    If you omit SERVER=, the default action for your operating system occurs. On UNIX systems, the value of the environment variable DSQUERY is used if it has been set.
    INTERFACE=filename
    specifies the name and location of the Sybase interfaces file. The interfaces file contains the names and network addresses of all available servers on the network.
    If you omit this statement, the default action for your operating system occurs. INTERFACE= is not used in some operating environments. Contact your database administrator to determine whether it applies to your operating environment.
    BULKCOPY= Y|N;
    uses the Sybase bulk copy utility to insert rows into a Sybase table. The default value is N.
    If you specify BULKCOPY=Y, BULKCOPY= calls the Sybase bulk copy utility in order to load data into a Sybase table. This utility groups rows so that they are inserted as a unit into the new table. Using the bulk copy utility can improve performance.
    You use the COMMIT= statement to specify the number of rows in each group (this argument must be a positive integer). After each group of rows is inserted, the rows are permanently saved in the table. As each group is being inserted, if one row in the group is rejected, all rows in that group are rejected.
    If you specify BULKCOPY=N, rows are inserted into the new table using Transact-SQL INSERT statements. See your Sybase documentation for more information about the bulk copy utility.

Example

The following example creates a new Sybase table, EXCHANGE, from the DLIB.RATEOFEX data file. (The DLIB.RATEOFEX data set is included in the sample data that is shipped with your software.) An access descriptor ADLIB.EXCHANGE is also created, and it is based on the new table. The DBLOAD procedure sends a Transact-SQL GRANT statement to Sybase. You must be granted Sybase privileges to create new Sybase tables or to grant privileges to other users.
libname adlib 'SAS-library';
libname dlib 'SAS-library';

proc dbload dbms=sybase data=dlib.rateofex;
   server='server1';
   database='testdb';
   user='testuser';
   password='testpass';
   table=EXCHANGE;
   accdesc=adlib.exchange;
   rename fgnindol=fgnindolar 4=dolrsinfgn;
   nulls updated=n fgnindol=n 4=n country=n;
   load;
run;