Date: Tue, 2 Oct 2001 08:13:02 -0500
Reply-To: Gary Ross <gary_ross@MGIC.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gary Ross <gary_ross@MGIC.COM>
Organization: MGIC
Subject: Re: Oracle to SAS
Content-Type: text/plain; charset=us-ascii
Use something like the following (modified for your shop of course):
PROC ACCESS DBMS=DB2 ACCDESC=ACCLIB.LZBNKRPT;
CREATE WORK.LZBNKRPT.VIEW;
SELECT
ZK_BNKRPT_CHPTR_NB as bkchap
ZK_UPD_TS as timestmp
;
LIST ALL;
RUN;
Terry Fudin wrote:
> I am using PROC ACCESS to convert an Oracle dataset to a SAS dataset.
> When an Oracle variable names is over 8 characters long and the first
> 8 characters are not unique, new SAS variable names are arbitrarily
> assigned in the newly created SAS dataset as in the following example
> below:
>
> Oracle Variable Name SAS Variable Name
> -------------------- -----------------
> CUSTOMERNO1 CUSTOMERN
> CUSTOMERNO2 CUSTOMER1
> CUSTOMERNO3 CUSTOMER2
> CUSTOMERNO4 CUSTOMER3
> CUSTOMERNO5 CUSTOMER4
>
> Is there a way I can contol this so I assign the variable names I want to
> choose myself?
>
> I am using code similar to that below:
>
> options linesize=80;
>
> libname adlib 'SAS-data-library';
> libname vlib 'SAS-data-library';
>
> /* create access descriptor */
>
> proc access dbms=oracle;
> create adlib.customer.access;
> user=testuser;
> orapw=testpass;
> table=customers;
> path='myorapath';
> assign=yes;
> format firstorder date9.;
> list all;
> run;
>
> /* create view descriptor */
>
> proc access dbms=oracle accdesc=adlib.customer;
> create vlib.socust.view;
> select all;
> run;
|