f



Re: Exporting Multiple SAS files to MS Access #3

thanks so much Paul, worked great!
0
kibrown (49)
12/5/2008 11:37:01 PM
comp.soft-sys.sas 142827 articles. 3 followers. Post Follow

0 Replies
651 Views

Similar Articles

[PageSpeed] 33

Reply:

Similar Artilces:

Re: Exporting Multiple SAS files to MS Access
Easiest way I can think of is to use a macro: %macro exporttoaccess(dset); PROC EXPORT DATA= K.&dset. OUTTABLE= "&dset" DBMS=ACCESS REPLACE; DATABASE="LOCATION"; RUN; %mend; and then you call it once for each table you want exported. It's technically doing a separate export, though you don't have to rewrite the code each time. (Note, it assumes all of your datasets are in library K - if this is not true it needs to have a library macro variable passed as well). I suspect you could also use LIBNAME to do this, but I am not familiar with how to use LIBNAMEs with access so I'll let someone more export to answer that. -Joe On Fri, Dec 5, 2008 at 11:47 AM, Kim Brown <kibrown@ladhs.org> wrote: > Hi all, > Export from SAS to MS Access: > Is there a way to export 20 Data sets from SAS into MS Access without > writing separate export statement? > > This is the syntax, I'm using now. > PROC EXPORT DATA= K.HDHS_APR08 > OUTTABLE= "HDHS_apr08" > DBMS=ACCESS REPLACE; > DATABASE="LOCATION"; > RUN; > > Any help is appreciated, Thanks. Kim > ...

Re: Exporting Multiple SAS files to MS Access #2
Kim - open the MDB with the Access libname engine and use proc copy. libname mdb 'file.mdb'; proc copy in=sashelp out=mdb mt=data; select c:; run; libname mdb clear; You can list the files in the select statement or just drop it if you are copying a whole library. The MDB has to already exist, unlike the Excel libname the Access libname does not create files - so you can create it by hand, or trick SAS into making it. data dummy; dummy=''; run; filename MakeMDB 'file.mdb'; proc export data=dummy outtable="dummy" dbms=access2000 replace; database=MakeMDB; run; filename MakeMDB clear; proc delete data=dummy; run; libname acctb access 'file.mdb'; proc delete data=acctb.dummy; run; libname acctb clear; hth Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kim Brown Sent: Friday, December 05, 2008 9:47 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Exporting Multiple SAS files to MS Access Hi all, Export from SAS to MS Access: Is there a way to export 20 Data sets from SAS into MS Access without writing separate export statement? This is the syntax, I’m using now. PROC EXPORT DATA= K.HDHS_APR08 OUTTABLE= "HDHS_apr08" DBMS=ACCESS REPLACE; DATABASE="LOCATION"; RUN; Any help is appreciated, Thanks. Kim ...

Exporting Multiple SAS files to MS Access
Hi all, Export from SAS to MS Access: Is there a way to export 20 Data sets from SAS into MS Access without writing separate export statement? This is the syntax, I’m using now. PROC EXPORT DATA= K.HDHS_APR08 OUTTABLE= "HDHS_apr08" DBMS=ACCESS REPLACE; DATABASE="LOCATION"; RUN; Any help is appreciated, Thanks. Kim ...

Re: Exporting a SAS data set to Text file on SAS unix #3
hi ... actually, what I posted earlier was too much code (sorry) this is enough (a bit more succinct) * variable names into a macro variable (tab separated); proc sql noprint; select name into :vars separated by '09'x from dictionary.columns where libname eq 'SASHELP' and memname eq 'CLASS' order varnum; quit; data _null_; file 'z:\class.txt' dsd dlm='09'x ; if _n_ eq 1 then put "&vars"; set sashelp.class; put (_all_) (:); run; -- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402...

Re: from SAS to MS Access without Proc Export #3
On Mon, 22 Nov 2004 15:03:59 -0500, Bill Droogendyk <bill_droogendyk@DOFASCO.CA> wrote: >Folks: > >I've an application running from my PC via SAS Connect to the Mainframe >that harvests some MF data, downloads the data and uses proc export to >build an MS Access file. Now and again, the app fails due to a glitch >on our PC network. I'm doing it this way because we don't have proc >export on the MF. > >I can produce xl files from the MF to the PC network with ODS, html and >ftp. MS Access imports xl files quite readily, but xl files do have a ...

Re: exporting files directly from SAS to Microsoft access #3
Hi Wes, If your proc setinit; run; tells you that you have the PC File Formats you can use the dbms=access2000 corollary. Since you were using the dbms=excel2000 you probably do. For those that don't have the PC File Formats, but do have the ODBC, you can check out reading, writing, executing macros or admin commands, via the following old SAS-L archive posts: http://listserv.uga.edu/cgi-bin/wa?A2=ind0105B&L=sas-l&P=R27778 http://listserv.uga.edu/cgi-bin/wa?A2=ind0411A&L=sas-l&P=R1726 http://listserv.uga.edu/cgi-bin/wa?A2=ind0409D&L=sas-l&P=R2206 http://...

Re: Exporting Sas file to a csv extension file #3
Remember also that with pretty much any proc export, you can always use the export wizard to generate code for you, and then have it paste the code to the log so you can re-use it yourself later, if you're having trouble with export code (or import). -Joe On Sun, Sep 28, 2008 at 1:00 PM, Randy <randistan69@hotmail.com> wrote: > I have to convert a sas data file to a csv format file > My code is > > proc export data = Datahave; > outfile = 'C:\dataneed.csv' ; > run; > > The log gives me an error message > ERROR: FILE= or TABLE= is required and must be specified. > > What is the mistake that I am making? > On Monday, September 29, 2008 10:11:05 AM UTC-4, Joe Matise wrote: > Remember also that with pretty much any proc export, you can always use the > export wizard to generate code for you, and then have it paste the code to > the log so you can re-use it yourself later, if you're having trouble with > export code (or import). > > -Joe > > On Sun, Sep 28, 2008 at 1:00 PM, Randy <randistan69@hotmail.com> wrote: > > > I have to convert a sas data file to a csv format file > > My code is > > > > proc export data = Datahave; > > outfile = 'C:\dataneed.csv' ; > > run; > > > > The log gives me an error message > > ERROR: FILE= or TABLE= is required and must be specified. > > > > What is the mista...

Re: Outputting multiple SAS files to multiple worksheets
Steve, As toby and howard said, the code you have should work. Or else you might not have SAS/ODBC installed in your PC. please check that. thanks hari ...

Re: How to access a MS SQL file in SAS?
Are you opening your .csv file with Excel? that would truncate the number of records. You may want to create a libname for the SQL table or use Proc SQL pass-through. You'll need the SAS Access for your database, such as SAS Access for Relational Databases to use ODBC. If you create a libname for the table you can read it directly in either a datastep or Proc Sql using SAS commands. If you use Proc SQL pass-through you will need to be aware of how Transact SQL works and you'll need an odbc connection. Example: Pass-through where yourdatasourcename, etc are the names of the database ...

Re: from SAS to MS Access without Proc Export
Bill, proc export data=sasuser.cust outtable="customers" dbms=access97 replace; database="c:\myfiles\mydatabase.mdb"; run; HTH Toby Dunn -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bill Droogendyk Sent: Monday, November 22, 2004 2:04 PM To: SAS-L@LISTSERV.UGA.EDU Subject: from SAS to MS Access without Proc Export Folks: I've an application running from my PC via SAS Connect to the Mainframe that harvests some MF data, downloads the data and uses proc export to build an MS Access file. Now and agai...

Re: MS Access
Thanks Joe! Your posts always offer good info and they help me learn a lot. I only tried the data step update because it was something I read about in one of the many helpful SAS papers out there. That explains the log 'replace' note versus an 'update' note. So, here's what I did. I made a little temp data set with 2 obs and 3 variables: State_Project_Number Report_Month Payment_Disburse 0005-05-101 06-2009 111111 0008-14-110 06-2009 111111 Next, used SQL (my SQL knowledge being very limited): PROC SQL; UPDATE RADS.MONTHLY_S...

Re: from SAS to MS Access without Proc Export #6
To do it with SAS Base software alone, and without an intermediate file, try DDE. On Mon, 22 Nov 2004 15:03:59 -0500, Bill Droogendyk <bill_droogendyk@DOFASCO.CA> wrote: >Folks: > >I've an application running from my PC via SAS Connect to the Mainframe >that harvests some MF data, downloads the data and uses proc export to >build an MS Access file. Now and again, the app fails due to a glitch >on our PC network. I'm doing it this way because we don't have proc >export on the MF. > >I can produce xl files from the MF to the PC network with ODS, h...

Re: how to export sas data file to AS06 #3 652718
wy78712@YAHOO.COM wrote: >Is there any possible that I can export SAS data file >to AS06? Yes. Oh, you want more of an answer! Well, I'd like to. But I can't You didn't tell SAS-L anything that can help. What OS are you running? Do you have SAS installed on the IBM box? What version? Do you have SAS installed anywhere else? What connection or networking exists between the machine where you have SAS data, and the machine you want it moved to? How is the IBM box connected to the rest of your world? What SAS connectivity modules do you have? As you can see, some more information form you would help everyone else assist you. David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330 _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement ...

Re: exporting files directly from SAS to Microsoft access #2
If you have it licensed, then you can do precisely the same thing (DBMS=ACCESS). The syntax is slightly different, though: proc export data=dset outtable=<table name> dbms=access2000 replace; database="filename.mdb"; run; -Joe On Fri, Aug 7, 2009 at 10:32 AM, wes <w.greenhead@googlemail.com> wrote: > hi, > > Does anyone know if its possible to export files directly from SAS, > directly into a Microsoft Access Database? > > I know its possible to export straight into excel using this type of > code: > > PROC EXPORT DATA= WORK.Out_ave_stays ...

Re: from SAS to MS Access without Proc Export #2
You got sas/access for odbc? It's easy to do w/that: libname mdb ODBC required = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\Documents and Settings\pardre1\Desktop\DocEMails.mdb" ; libname scratch "\\ctrhs-dbserver\warehouse\sasdata\crn_vdw\scratch" ; data scratch.DocEMails ; set mdb.DocEMails ; run ; -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Bill Droogendyk Sent: Monday, November 22, 2004 12:04 PM To: SAS-L@LISTSERV.UGA.EDU Subject: from SAS to MS Access without Proc Export Folks: I've an applicat...

Re: exporting files directly from SAS to Microsoft access #5
hi ... how about just using a data step and a libname just create an empty ACCESS file (here, TEST.MDB) and the data set name (here, TABLE1) becomes the table name in access libname x access 'z:\test.mdb'; data x.table1; set whatever; run; libname x clear; -- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475 > yes, that's possible with SAS/ACCESS to ODBC as far as I know. > But that might be a expensive way. Does ACCESS support XML? If yes, that > might be a expensive way, but that's a...

Re: help SAS/MS ACCESS, general database questions #3
Rob: MS Access imports data easily from dBase (*.dbf) files. I see no advantage in moving to SAS for that feature, especially if you would prefer to use the basic DE form controls in MS Access to develop what should be a simple DE capability. Although ODBC transfers of data from MS Access (*.mdb) databases has some pitfalls, as does OLEdb or other middleware (in particular, conversions of integers to floating point numbers, date/time values, and nulls/missings), a bit of Q/C will help you iron out the wrinkles and set up a reliable connection. It often helps as well to separate a data collecti...

Re: Alternatives to SAS/ACCESS Interface to PC Files and/or ODBC #3
SAS/Access to OLEDB works well with both, and many other databases besides. Of course there's the $$$ factor. Then again, I work for a non-profit and we were able to swing it. ----- Original Message ----- From: "Bill McKirgan" <bill.mckirgan@GMAIL.COM> To: <SAS-L@LISTSERV.UGA.EDU> Sent: Tuesday, September 08, 2009 10:29 AM Subject: Alternatives to SAS/ACCESS Interface to PC Files and/or ODBC > What are some alternatives to PROC IMPORT/EXPORT and/or LIBNAME access > to MS-Excel and MS-Access formats? > > I've heard of DDE being used to read/write to...

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #3
Wow, that was a leap. Better not use Apache or PHP then. Andy >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On >Behalf Of ben.powell@CLA.CO.UK >Sent: Thursday, February 05, 2004 10:37 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) > >Sounds like R is the SAS equivalent of Linux .. who are >incidentally in all >sorts of a copy left/right mess at the moment. > >On Thu, 5 Feb 2004 09:39:37 -0500, Peter Flom <flom@NDRI.ORG> wrote: > >>I use both SAS a...

Re: Why I can't export the SAS talbe into Excel file? #3
My free Notebook can open any SAS dataset directly into MS Excel as a native *.xls spreadsheet. You don't need to write any PROC EXPORT code! Do NOT open it by double-clicking on the file icon from the File Explorer. Instead, click on the Data Editor tab and click on the 'Open Data File' toolbar item. Browse to the location of your SAS dataset file, select it, and click 'Open'. A dialog will appear asking you how you would like to open the data file. Select "Open in Excel as a native spreadsheet (*.xls)'. Get it free here: http://sas2themax.com/free or here: http...

Re: Reading MS Word ".doc" files into SAS #3
I first thought of DDE but I'm not sure that it will work here since, as far as I remember, DDE only reads tabular data from word. Since the desire is to read some part of the doc, I wonder if you could use SAS to open the doc using the word macros and then save it to a text file which could be parsed. This would be an alternative to using a downloaded executable. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Ya Huang <ya.huang@AMYLIN. COM&...

Re: SAS/access for Oracle and MS SQL server are different license? #3
Thanks Michael, But SAS/Access to ODBC or SAS/Access to OLE DB are also need to be licensed right? Looks like we don't have them either. Are there other options? On Tue, 28 Apr 2009 15:37:28 -0400, Michael Raithel <michaelraithel@WESTAT.COM> wrote: >Dear SAS-L-ers, > >Ya Huang posted this interesting question: > >> Hi there, >> >> I ran proc setinit and see we have SAS/ACCESS Interface to >> ORACLE, but not MS SQL server. Does it mean we need to pay >> the license of SQL server in order to access SQL server? I >> see people sometimes simply say "SAS/access for RDBMS", does >> it mean all RDBMS (Oracle, DB2, SQL Server, MySQL etc.) are >> under one umbrella, so that you only need to pay SAS/access for RDBMS? >> >Ya, here at SAS Mecca a number of folks use SAS/Access to ODBC or SAS/Access to OLE DB to access and crunch data stored in SQL Server databases. Seeing as you do not have SAS/Access to MS SQL, perhaps you have one of the aforementioned products... If so, then you should be good- to-go. If not, then it is time for Plan B... which will require the presence of your company's accountants:-( > >Ya, best of luck in all of your SAS endeavors! > > >I hope that this suggestion proves helpful now, and in the future! > >Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or meth...

Re: Exporting Sas file to a csv extension file
Randy, Remove the semicolon from the first line, plus you may need to add a dbms option. For example, try something like: proc export data = Datahave outfile = 'C:\dataneed.csv' DBMS=csv REPLACE; run; HTH, Art -------- On Sun, 28 Sep 2008 14:00:24 -0400, Randy <randistan69@HOTMAIL.COM> wrote: >I have to convert a sas data file to a csv format file >My code is > >proc export data = Datahave; >outfile = 'C:\dataneed.csv' ; >run; > >The log gives me an error message >ERROR: FILE= or TABLE= is required and must be specified. > >What is the mistake that I am making? ...

Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #3
First, let me admit/acknowledge that I have no knowledge of the history of this thread. Been tied up catching up post SAS Global Forum and post the announcement of sasCommunity.org. But I would like to offer some thoughts regarding Toby's comment: > No as for the sascommunity.org, do we really want a macro library. Well I > would say yes and no. I would like to have one and there are those who > have > paced some Macros on there already. I believe Don and Ron both have, > actually they were on there before the Wiki went public. However, since > people tend to get Ma...

Web resources about - Re: Exporting Multiple SAS files to MS Access #3 - comp.soft-sys.sas

Gas Exporting Countries Forum - Wikipedia, the free encyclopedia
The Gas Exporting Countries Forum ( GECF ) is an intergovernmental organization of 11 of the world's leading natural gas producers made up of ...

Facebook policy now clearly bans exporting user data to competing social networks
... of account settings, so it’s unlikely that many users have done this. Google and Facebook blocked or put up roadblocks on importing and exporting ...

The Price of Oil book review: Paints a gloomy picture for prices, companies and exporting countries
In Roberto Aguilera and Marian Radetzki's new book, The Price of Oil, the two economists are optimistic about the expansion of global oil production ...

Lower dollar a boon for Canberra's wine exporting king
It may mean more expensive holidays for some, but one ACT registered company has enjoyed a profitable time thanks to the sharp fall in the Australian ...

Irish plant shut for exporting horsemeat
Sky News is Australia's leader in 24-hour news.

New online freight marketplace Cargohound aims to be the Uber of exporting
Cargo Hound wants to revolutionise the way goods are shipped from Australia.

Exporting the desperate; out of sight ... and mind
The boats have stopped, the point's been made, so why continue to treat those already ''here'' with such unconscionable cruelty?

Meat market: Andrew Forrest sees fortune in exporting beef to China
China is so desperate for good beef that Australian billionaire Andrew Forrest will be taking sample parcels of steak in his luggage on his next ...

Exporting carbon and hypocrisy: our big growth industry
Never mind our modest cuts to local emissions, new research shows Australia is heading into a carbon export boom.

Spin Cycle: Is Tom Mulcair in favour of exporting bulk water?
The Liberals say Tom Mulcair spoke favourably about the idea of water exports when he was Quebec's environment minister back in 2004. They even ...

Resources last updated: 3/16/2016 3:09:48 PM