f



Re: Create SAS dataset from C# data table or data set

Mike,

Read my paper on how to create your first .net app on sascommunity.org for
how to read a SAS dataset. There are a lot of nuances though. Watch out for
formats.

Yes, you can stream the graph. Have SAS gen it then read it as binary.

Alan

Alan Churchill
Savian "Bridging SAS and Microsoft Technologies"
www.savian.net



-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mike
Durbin
Sent: Thursday, May 31, 2007 1:59 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Create SAS dataset from C# data table or data set

SAS-L,

  We are evaluating SAS/Integration Technologies and have what we think
should be straight forward question.  How can I have .Net create or update
a SAS dataset on our backend SAS AIX server?

  Also, if the backend SAS server creates a graph can I stream it to the
C# client server application?

Thanks in advance for all your advice,

Mike Durbin
0
savian001 (795)
5/31/2007 8:30:30 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

1 Replies
782 Views

Similar Articles

[PageSpeed] 11

Hi,

I try to integrate C#.Net with SAS using COM. I used the FlustList()
function to get output from SAS.
Is there option to capture SAS output variables into dotnet Dataset??

Thanks in advance.

Regards.,

Sabari.V

0
6/26/2007 5:12:44 AM
Reply:

Similar Artilces:

Re: Create SAS dataset from C# data table or data set #2
Download the SAS OleDb driver (free) and use the following code: private static DataTable LoadSasDataSet() { try { string library = prop.Default.SasLibrary ; string dataset = prop.Default.SasDataset; DataSet sasDs = new DataSet(); OleDbConnection sas = new OleDbConnection("Provider=sas.LocalProvider; Data Source=" + library); sas.Open(); OleDbCommand sasCommand = sas.CreateCommand(); sasCommand.CommandType = CommandType.TableDirect;...

Create SAS dataset from C# data table or data set
SAS-L, We are evaluating SAS/Integration Technologies and have what we think should be straight forward question. How can I have .Net create or update a SAS dataset on our backend SAS AIX server? Also, if the backend SAS server creates a graph can I stream it to the C# client server application? Thanks in advance for all your advice, Mike Durbin Mike, Read my paper on how to create your first .net app on sascommunity.org for how to read a SAS dataset. There are a lot of nuances though. Watch out for formats. Yes, you can stream the graph. Have SAS gen it then read it as binary. Al...

Re: How to filter sas data sets into separate sas data sets
Lizette, a quick question first: what release of SAS are you using? Seems like an ideal task for a hash solution. Hashes however are only available with SAS version 9. Robert Bardos Ansys AG, Zurich, Switzerland > -----Ursprüngliche Nachricht----- > Von: SAS(r) Discussion > [mailto:SAS-L@LISTSERV.UGA.EDU]Im Auftrag von > Lizette Koehler > Gesendet: Montag, 2. April 2007 16:53 > An: SAS-L@LISTSERV.UGA.EDU > Betreff: How to filter sas data sets into separate sas data sets > > > Listers, > > This is my failing point in coding SAS. The use of 2 > se...

Re: How to filter sas data sets into separate sas data sets #3
Lizette, Instead of trying to merge the two data sets, I would probably try to create a SAS format from the values of VAR1 in data set 1. Then, NODE1, NODE2 and NODE3 could be compared against the format for a match. The example below is a simplified version of what you could do and shows a printout of how it works. It has 5 observations in data set 1 and only 3 variables in data set 2, but I think the logic should hold for the example you gave. After the example is code that could be used to actually split the data as you had requested. Hope this helps. * create sas data set 1 ; data ...

Re: How to filter sas data sets into separate sas data sets #4
Something like this is the old way. You could use a proc sql if you have a new enough version. Increase your buffersize and if you have enough memory you may get it into a hash routine. DATA WORK.NEW; MERGE small (IN=A OBS=500) big ; BY ID_FIELD; IF A=1; RUN; QUIT; RICH -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@listserv.vt.edu] On Behalf Of Lizette Koehler Sent: Monday, April 02, 2007 10:53 AM To: SAS-L@LISTSERV.VT.EDU Subject: How to filter sas data sets into separate sas data sets Listers, This is my failing point in coding SAS. T...

Re: How to filter sas data sets into separate sas data sets #2
you cannot do this as described without a common link here, your Var1 Note: both data sets must be sorted by Var1 Data Newlist (KEEP=node1 node2 node3 ... var15) Otherds (Keep=node1 node2 node3 .... var15) ; do until(EndoFile); Set SASDS1 SASDS2 end = EndoFile; by Var1; *consider: if Var1 in (Node1 Node2 Node3); If Node1 = VAR1 or Node2 = VAR1 or Node3 = Var1 then Output Newlist ; Else Output Otherds ; end; stop; Undoubtedly the HashHeads will propose a lookup table but the above is what you are trying to do. Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov > From: starsoul@mindspring.com > Listers, > > This is my failing point in coding SAS. The use of 2 > separate SAS data sets to create a third. > > I can do this in a program with nested Do loops. But with > SAS it is just different enough I seem to be unable to see > the coding technique. > > Problem: > > Sas Data set 1 contains 1 variable and 1000 obs. > Sas Data set 2 contains 15 variables and 500000 obs. > > I need to filter off the data in Sas data set 2 based on Sas > data set 1 > > Node1, Node2 and Node3 must match VAR1 exactly. I have all > the code I need to do this except for splitting the data into > a separate SAS data set (NEWLISTS). > > > Psuedo code: > > Sas Data set 1: Var1 Length 7 Char > Sas Data set 2: Node1 Length 1-8 Char Node2 Length 1-8 > Char Node3 Length 1...

Re: How to filter sas data sets into separate sas data sets #8
On Mon, 2 Apr 2007 23:37:16 +0000, Ian Whitlock <iw1junk@COMCAST.NET> wrote: >Summary: You need a loop and the POINT option or SQL >#iw-value=1 > >Lizette, > >I think a lot of respondents have misunderstood the problem. This probably >could have been avoided with a simplified example. Here is my >interpretation. Here is code to generate data. > > data control ; > do var1 = 1 to 4 ; output ; end ; > run ; > > data tosplit ; > input node1 node2 node3 other ; > cards ; > 1 2 3 4 > 1 2 3 5 > 7 7 7 7 > ; ...

Re: How to filter sas data sets into separate sas data sets #7
Summary: You need a loop and the POINT option or SQL #iw-value=1 Lizette, I think a lot of respondents have misunderstood the problem. This probably could have been avoided with a simplified example. Here is my interpretation. Here is code to generate data. data control ; do var1 = 1 to 4 ; output ; end ; run ; data tosplit ; input node1 node2 node3 other ; cards ; 1 2 3 4 1 2 3 5 7 7 7 7 ; Here is a way to split using the DATA step. data newlist other ; drop flag var1 ; set tosplit ; do pt = 1 to nobs ; set control point = p...

Re: How to filter sas data sets into separate sas data sets #6
First off, you don't need two set statements, I suspect you want a merge. (remember to sort datasets before merging) Data newlist (KEEP=node1 node2 node3 ... var15) Otherds (Keep=node1 node2 node3 .... var15) ; Merge sasds1 sasds2; By ;/*not sure which variable you need, but there has to be something that is the same between the two*/ What I'd really need to know is what are the field names in DS1 and DS2 (You described them but didn't tell us the names) You will possibly need a REANME= statement to get a matching name to merge by. Either read up more on merges and REN...

Re: How to filter sas data sets into separate sas data sets #5
Lizette: Can you show (1) your nested do loops that work for you, and (2) some sample data and the data sets that you desire to get? -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Lizette Koehler Sent: Monday, April 02, 2007 9:53 AM To: SAS-L@LISTSERV.UGA.EDU Subject: How to filter sas data sets into separate sas data sets Listers, This is my failing point in coding SAS. The use of 2 separate SAS data sets to create a third. I can do this in a program with nested Do loops. But with SAS it is just different enough I seem to be unable to ...

Re: How to filter sas data sets into separate sas data s ets
I think that both Ron's (as he mentioned) and Richard solutions require that VAR1 is in both datasets. But from the original post, it seemed to me that VAR1 is only in data set 1, and it must be matched to 1 of 3 variables in data set 2 (NODE1, NODE2 or NODE3) to be output to the NEWLIST data set. For this reason, I think a format is one possible approach. Maybe the original poster can clarify this point. Thanks. Jack Clark Research Analyst Center for Health Program Development and Management University of Maryland, Baltimore County -----Original Message----- From: SAS(r) Discussio...

How to filter sas data sets into separate sas data sets
Listers, This is my failing point in coding SAS. The use of 2 separate SAS data sets to create a third. I can do this in a program with nested Do loops. But with SAS it is just different enough I seem to be unable to see the coding technique. Problem: Sas Data set 1 contains 1 variable and 1000 obs. Sas Data set 2 contains 15 variables and 500000 obs. I need to filter off the data in Sas data set 2 based on Sas data set 1 Node1, Node2 and Node3 must match VAR1 exactly. I have all the code I need to do this except for splitting the data into a separate SAS data set (NEWLISTS). Psuedo...

Re: Deleting SAS Data from a SAS DATASET
One thing you might do is to add an index on the snap_dt to the dataset; = if that's there then you should be able to delete the records in place: proc sql; delete from prod.master_date; where snap_dt =3D "&end_dt"d; quit; run; In both the ways you are trying now you are creating new data sets = rather than deleting records from the current data set; it would seem to = me that a SQL delete statement would be faster than creating new = datasets even if there isn't an index on the date.=20 -Mary ----- Original Message -----=20 From: SUBSCRIBE SAS-L Chandra Gadd...

Re: search SAS data set from SAS code
> From: Rose > Hi All, > Suppose I have a sas permanent data set which was created > early, I know > the library path but I couldn't remember in which sas program code I > created it. how can I search from so many sas program files in > different folders and find it. a problem familiar to all of us delayed-housekeeping folks. Libname Libref '<directory-specification>'; DATA LibRef.DataSetName; use your system utilities to search for the dir-spec of your libref. search: *.sas containing text: <dir-spec> once you have found the libname...

Re: Deleting SAS Data from a SAS DATASET #9
On Fri, 15 Aug 2008 16:09:46 -0500, Mary <mlhoward@AVALON.NET> wrote: >A view helps on deletes, but I wonder how it affects performance of querying the data- wouldn't storing the data in 24 different locations cause a significant slowdown in perfomance upon querying the data versus having it all in one table that is indexed? If this data is queryied a lot but only deleted once a month, the time in querying (which probably is in peak time) could be much more important than the time in deleting (which could be run when the computer is not busy, such as nights or weekends). hi, go...

Re: Deleting SAS Data from a SAS DATASET #11
And what about the time of the database administrator who now needs to = keep track of 24 indexes to each index in the previous table? I just = can't see our DB2 administrators would have ever thought to organize the = data this way, though we had many very large tables, like the user had, = that were purged by month; it does seem like it would be a lot of = "people work" to manage 24 tables plus one index instead of just one = table, even if querying didn't suffer(and I do think that it could).=20 -Mary ----- Original Message -----=20 From: Chang Chung=20 To: SAS-L@L...

Re: Deleting SAS Data from a SAS DATASET #17
When I used this code, I am receiving the following warning. It completely deleted my prod.master_date SAS Dataset. Do you know what is going on here? WARNING: This SAS global statement is not supported in PROC SQL. It has been ignored. On Fri, 15 Aug 2008 13:17:25 -0500, Mary <mlhoward@AVALON.NET> wrote: >One thing you might do is to add an index on the snap_dt to the dataset; if that's there then you should be able to delete the records in place: > >proc sql; > delete from prod.master_date; > where snap_dt = "&end_dt"d; >quit; >run; > &...

Re: Deleting SAS Data from a SAS DATASET #18
Chandra, This is an excellent suggestion from Ian! Perhaps just recreate the = data set (you would in that case want to recreate, and thus NOT use the = SQL delete statement) once every 2-3 months and delete 2-3 months worth = of data at that time; it would seem that that wouldn't take too much = longer than deleting 1 month at a time, and thus the total time would be = reduced by as much as 50%. And this would meet my favorite efficiency marker, since I've met a lot = of people who don't want to work weekends and have yet to meet a = computer who cares, "less people time!...

Re: XML data to SAS data set converstion
It depends on the XML document. What is the complexity and what O/S are you running on? I have built utilities for doing XML to SAS conversion. You would need to use a .NET language and consume the dll. The tool can be found at: http://utilities.savian.net Look for Data Management Utilities. You could also try my XML to delimited and see if that works for you. I haven't touched it in a few years so let me know if does not work. For other tools, buy XmlSpy and do a conversion to a format that SAS can read. Load your XML document and then have it convert it to a text or database. You wo...

Re: Deleting SAS Data from a SAS DATASET #19
On Mon, 18 Aug 2008 10:26:14 -0400, SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM> wrote: >When I used this code, I am receiving the following warning. It completely >deleted my prod.master_date SAS Dataset. Do you know what is going on here? > >WARNING: This SAS global statement is not supported in PROC SQL. It has >been ignored. In PROC SQL, WHERE must be a clause within a statement, not a freestanding statement. Get rid of the semicolon immediately before the word "where". Incidentally, I think the warning is inaccurate in referring to a WHERE statement as a global statement. > > > >On Fri, 15 Aug 2008 13:17:25 -0500, Mary <mlhoward@AVALON.NET> wrote: > >>One thing you might do is to add an index on the snap_dt to the dataset; >if that's there then you should be able to delete the records in place: >> >>proc sql; >> delete from prod.master_date; >> where snap_dt = "&end_dt"d; >>quit; >>run; >> >>In both the ways you are trying now you are creating new data sets rather >than deleting records from the current data set; it would seem to me that a >SQL delete statement would be faster than creating new datasets even if >there isn't an index on the date. >> >>-Mary >> ----- Original Message ----- >> From: SUBSCRIBE SAS-L Chandra Gadde >> To: SAS-L@LISTSERV.UGA.EDU >> Sent: Friday, August ...

Re: Deleting SAS Data from a SAS DATASET #10
On Fri, 15 Aug 2008 17:20:13 -0500, Mary <mlhoward@AVALON.NET> wrote: >And what about the time of the database administrator who now needs to keep track of 24 indexes to each index in the previous table? I just can't see our DB2 administrators would have ever thought to organize the data this way, though we had many very large tables, like the user had, that were purged by month; it does seem like it would be a lot of "people work" to manage 24 tables plus one index instead of just one table, even if querying didn't suffer(and I do think that it could). .... hi, Th...

Re: Deleting SAS Data from a SAS DATASET #6
I have been watching this thread today and I just now recall an example that Paul Dorfman gave at a RUG several years ago and no, I don't recall exactly where or when other than it was NESUG or SESUG in the past 5 years. Anyway, Paul had a client who was storing something like the past 12 months of transactions as variables andat the start of each month needed to stick the just ended month on the end and drop the oldest month. Paul used Peek to read the last 11 months of each obs as a single chunk of data, append the current's month, and then used Poke to write the whole new obs as a ...

Re: Deleting SAS Data from a SAS DATASET #13
I am not expert with indexes, but I would expect that an index on each data set would be employed even when the data are accessed through a view. If that is correct, there would be clear advantage to indexing data for each month separately. If the data are in one large file, then when old data are deleted and new data added, the entire index will need to be recreated on all of the data. That is a big operation. If, instead, data are maintained in separate files for each month and each month of data is indexed independently, then indexing needs to be performed only for the new data. The ind...

Re: Deleting SAS Data from a SAS DATASET #5
I also read that this could be a problem on machines that have multiple = processors, such as running DB2; if the data is clustered and each = processor takes care of one cluster, then you could have queries all = hitting the same processor instead of distributing the load across all = processors, thus potentially slowing down queries in peak periods where = you have multiple queries at the same time, if queries tend to be based = on the month (such as bank statements). Thus I'd proceed with caution = on the idea of splitting one table into 24 tables with one view without = making sure th...

Web resources about - Re: Create SAS dataset from C# data table or data set - comp.soft-sys.sas

Data set - Wikipedia, the free encyclopedia
For IBM mainframe term for a file, see Data set (IBM mainframe) . For the telecommunications interface device, see Modem . A dataset (or data ...

Data : Where can I get large datasets open to the public?
Answer (1 of 91): Here's the ones I've found most useful: CrunchBase, US Census, Google Public Data, Infochimps, Timetric, Factual, Freebase, ...

YouTube - Hans Rosling: Let my dataset change your mindset
Hochgeladen am 31.08.2009 http://www.ted.com Talking at the US State Department this summer, Hans Rosling uses his fascinating data-bubble software ...

The Mindset, Skillset, Dataset Approach to Social Media
... Social media is comprised primarily of unstructured data, which is difficult to analyze. A new approach called Mindset, Skillset, Dataset can ...

Sending large datasets to Amazon? Use the Post Office
Amazon has introduced a new method to move large amounts of data to and from …

The Full Dataset on What VCs are Thinking About Funding in 2016
... challenging and many other startups were cutting costs (as many of ours has done in late 2015). We promised that we would clean up the dataset ...

Yahoo Releases the Largest-ever Machine Learning Dataset for Researchers
Yahoo is announcing the public release of the largest-ever machine learning dataset to the research community.

IDG Contributor Network: Are datasets truly anonymized? Two well-suited researchers are going to find ...
With little fanfare or formality, Adam Smith , associate professor of computer science and engineering in Penn State's School of Electrical Engineering ...

House GOP looks to shed light on EPA secret datasets
House Republicans have introduced a bill that would block the Environmental Protection Agency from crafting regulations based on “secret” scientific ...

Google Making It Easier to Transfer Huge Datasets on the Cloud
... Cloud Import services are now in preview mode, but could later be available on a widespread basis to help enterprises move their large datasets ...

Resources last updated: 2/29/2016 7:58:10 AM