[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: dsread - Windows command-line utility for SAS7BDAT files
From:       xlr82sas <xlr82sas () AOL ! COM>
Date:       2010-02-27 6:09:26
Message-ID: 55146c97-4737-4221-816e-5d90a5322d47 () v20g2000prb ! googlegroups ! com
[Download RAW message or body]

On Feb 26, 7:29 pm, xlr82sas <xlr82...@aol.com> wrote:
> On Feb 26, 9:06 am, alan.church...@SAVIAN.NET (Alan Churchill) wrote:
>
>
>
>
>
> > Again, piping is easy. I'll try and toss something together this weekend and
> > pipe delimited, Excel, and XML.
>
> > I am a bit unclear on what it is you need. If I dump the data to a delimited
> > file, for example, I treat the values as doubles (do not print hex
> > representation) so you should have better representation anyway. You can
> > always convert them as needed.
>
> > Alan
>
> > Alan Churchill
> > Savianwww.savian.net
> > Office:   (719) 687-5954
> > Cell:      (719) 310-4870
>
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SA...@LISTSERV.UGA.EDU] On Behalf Of
>
> > xlr82sas
> > Sent: Thursday, February 25, 2010 7:43 PM
> > To: SA...@LISTSERV.UGA.EDU
> > Subject: Re: dsread - Windows command-line utility for SAS7BDAT files
>
> > Hi Alan and Chis
>
> >     What interests me is communications with open source products,
> > like R, perl and MySQL. Export and import needs to be lossless. My
> > understanding is that SAS -ODBC/OleDB... requires you to bring up
> > SAS(ODBC server) and the server has to be closed manually. I feel this
> > is unsatisfactory. The crux of the issue is IEEE floating point. I
> > think HEX16. would be lossless, all  I have to in R is convert the
> > character  hex16. to  floating point. The nice thing about dsread is
> > it is light, fast and you do not need SAS and it looks like it
> > supports pipes.
>
> > On Feb 25, 12:15 pm, xlr82sas <xlr82...@aol.com> wrote:
> > > On Feb 25, 10:43 am, xlr82sas <xlr82...@aol.com> wrote:
>
> > > > On Feb 25, 6:45 am, ChrisBLong <ch...@oview.co.uk> wrote:
>
> > > > > Hi,
>
> > > > > Readers of this group may be interested in dsread, available
> > athttp://www.oview.co.uk/dsread
>
> > > > > It's a command-line utility that understands the SAS7BDAT file
> > > > > format.  It lets you examine the structure of datasets conveniently
> > > > > from the command-line, and converts SAS7BDAT data into valid CSV
> > > > > format for import into other software.
>
> > > > > All comments and suggestions gratefully received,
>
> > > > > Chris.
>
> > > > Hi Chris,
>
> > > >    Congratulations for reading SAS datasets. WPS has powerfull
> > > > capabilities. Thanks!!! Competition is great.
>
> > > >    Even though you only create csv's, I see this as a great product
> > > > because you do not need SAS and with pipes users can programtically
> > > > get at SAS data from other languages. Also CSVs are also very amenable
> > > > to EXCEL.
>
> > ===========================================================================ญญ
> > ===================================================
>
> > > > Just some thoughts:
>
> > > >    Any chance you could create a lossless output format, like SAS
> > > > export datasets, but allow for longer names and
> > > > character values greater than 200 bytes. This would open up SAS
> > > > datasets to other languages. The format would have to be open.
>
> > > >   This could be a really big deal, if instead of a csv, you created R
> > > > dataframes, if called from R. An even bigger deal would be if you
> > > > created a SAS dataset from an R dataframe.
>
> > > >   XML would be another nice output.
>
> > > >   A silient ODBC would also be great.
>
> > > >   I bet you can use pipes whith yow command line interface.
>
> > > My apologies.
>
> > > I assumed your site was somehow affiliated with WPS.
> > > It looks like it may not be.
>
> > > Which makes what you have done all the more remarkable.
>
> > > I was hoping you honored formats because I wanted to associate hex16
> > > with the numeric columns so I could create a lossless csv, but it did
> > > not work.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
> Hi,
>
>   I think you may have misunderstood me, when I said pipe, I did not
> mean pipe delimited.
>
>  I meant
>
>  filename pyp pipe "dsread.exe < data.sas7bdat";
>
>   I do plan on using dsread this weekend.
>
>   I will share my experieces with you.- Hide quoted text -
>
> - Show quoted text -

FYI

I just posted this to the R group

If I do the following

sprintf("%A",pi)
"0X1.921FB54442D18"

I have this 16 byte character string

hx<-"400921FB54442D18"

This is the exact hex16 representation of PI in
IEEE float that R uses in Intel 32bit(little endian) Windows
SAS uses the same representation. 11 bit exponent and 53 bit
mantissa.

I want to do is recreate the float exactly from the 16 char hex

something like

MyPI<-readChar(hx,numeric(),16)

or in SAS

MyPI=input("400921FB54442D18",hex16.);
put MyPI=;

MYPI=3.1415926536

What I am trying to do is set up a lossless
transfer method from SAS to R
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic