LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 May 2001 16:49:14 -0400
Reply-To:     "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Subject:      Re: Retrieve Table Name From View
Content-Type: text/plain; charset="iso-8859-1"

Though I've never interrogated an Oracle table in my life, I'd try the DESCRIBE verb:

proc sql; describe view viewname ; quit;

-----Original Message----- From: m-carlson@WORLD.STD.COM [mailto:m-carlson@WORLD.STD.COM] Sent: May 24, 2001 4:37 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Retrieve Table Name From View

Hi,

SAS Version: 6.12 OS: VMS

Does anyone know of any way to retrieve the Oracle table name after a permanent SAS View has been created?

In other words, if I have a SAS View file, DETAIL.SASEB$VIEW which can be used to pull data from an Oracle table called DETAIL_CUST_ACCT, how can I retrieve the long Oracle table name when given only the SAS View file.

I consulted SAS on-line support and found a non-VMS solution which I'll tack on the bottom of this post. But it really doesn't help my situation.

Thanks in advance.

Matt mcarlson @ world.std.com

/* Retrieve the Oracle table name from the SAS View Descriptor */

/*******************************************************************\ | Copyright (C) 1997 by SAS Institute Inc., Cary, NC, USA. | | | | SAS (R) is a registered trademark of SAS Institute Inc. | | | | SAS Institute does not assume responsibility for the accuracy of | | any material presented in this file. |

\*******************************************************************/ /* This is a program to read the RDBMS table name from a sas view descriptor */

filename fileref '$HOME/viewname.ssv01'; libname libref 'SAS-Data-Library';

data a; infile fileref recfm=n; input @1217 sasver $CHAR4. dbmspath $char80. tablenm $CHAR60.; put tablenm; call symput('macrovar',tablenm); /* This is creating a global */ stop; /* macro to use anywhere in sas */ run;

proc contents data=libref.viewname; title "THIS IS PROC CONTENTS OUTPUT FROM OUTPUT FROM ORACLE TABLE &marcovar"; run;

-- Note:

To reply to me, remove the hyphen ("-") from my username.


Back to: Top of message | Previous page | Main SAS-L page