From: Hari on
Hi,

I have a huge SPSS file which I need to read in to SAS. I have saved
the SPSS file as .POR format and subsequently read it in to SAS.

Issue is Iam not able to read in the value labels from SPSS to SAS.
Whats the best approach for the same. I have more than 1000 variables
and many such files.

I have tried using the trial version of SPSS 14 and saving it as
..Sas7bdat and using the option of "Save value labels in to a SAS file"
but this way for many variables the variable labels dont come up.

I thought that probably saving from SPSS as a SAS Transport file
mightdo the trick and in SAS when I wrote the following syntax to read
in the newly created transport file "Reading Xpt.xpt"

filename xpthand "C:\Documents and Settings\prasadhh\Local
Settings\Temp\Temp\Reading Xpt";

proc cimport library=work.try infile=xpthand;
run;

I get the following error
5347 proc cimport library=work.try infile=xpthand;
-------- ------
22 202
WARNING: The Base Product product with which CIMPORT is associated will
expire within 30 days.
Please contact your SAS installation representative to have it
renewed.
ERROR 22-322: Expecting a name.
ERROR 202-322: The option or parameter is not recognized and will be
ignored.
5348 run;


What method should I use so that both value labels and variable lables
are being able to read in to SAS.

Please guide me

Regards,
HP
India

From: LouisBB on
Dear HP,

Try the Import procedure with SAV as DBMS.

proc import datafile='C:\myDirectory\mySpssFile.sav' out=mySasDataset
dbms=sav replace; run;

http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a000308090.htm

LouisBB.

"Hari" <excel_hari(a)yahoo.com> wrote in message
news:1153729306.992657.325640(a)i3g2000cwc.googlegroups.com...
> Hi,
>
> I have a huge SPSS file which I need to read in to SAS. I have saved
> the SPSS file as .POR format and subsequently read it in to SAS.
>
> Issue is Iam not able to read in the value labels from SPSS to SAS.
> Whats the best approach for the same. I have more than 1000 variables
> and many such files.
>
> I have tried using the trial version of SPSS 14 and saving it as
> .Sas7bdat and using the option of "Save value labels in to a SAS file"
> but this way for many variables the variable labels dont come up.
>
> I thought that probably saving from SPSS as a SAS Transport file
> mightdo the trick and in SAS when I wrote the following syntax to read
> in the newly created transport file "Reading Xpt.xpt"
>
> filename xpthand "C:\Documents and Settings\prasadhh\Local
> Settings\Temp\Temp\Reading Xpt";
>
> proc cimport library=work.try infile=xpthand;
> run;
>
> I get the following error
> 5347 proc cimport library=work.try infile=xpthand;
> -------- ------
> 22 202
> WARNING: The Base Product product with which CIMPORT is associated will
> expire within 30 days.
> Please contact your SAS installation representative to have it
> renewed.
> ERROR 22-322: Expecting a name.
> ERROR 202-322: The option or parameter is not recognized and will be
> ignored.
> 5348 run;
>
>
> What method should I use so that both value labels and variable lables
> are being able to read in to SAS.
>
> Please guide me
>
> Regards,
> HP
> India
>


From: Hari on

LouisBB wrote:

> Dear HP,
>
> Try the Import procedure with SAV as DBMS.
>
> proc import datafile='C:\myDirectory\mySpssFile.sav' out=mySasDataset
> dbms=sav replace; run;
>

Thanks for the note.

When I try proc Import, I get the following error message:-

7 proc import datafile="D:\Work\Assorted stuff\My Project\2005\Raw
Data\2006
7 ! 07 07\My project\Product\ProductA_only.sav" out=mySasDataset
8 dbms=sav replace;
ERROR: DBMS type SAV not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

8 ! run;


Please note I do have SAS PC License (though its in warning period
right now).

Regards,
HP
India

> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a000308090.htm
>
> LouisBB.
>
> "Hari" <excel_hari(a)yahoo.com> wrote in message
> news:1153729306.992657.325640(a)i3g2000cwc.googlegroups.com...
> > Hi,
> >
> > I have a huge SPSS file which I need to read in to SAS. I have saved
> > the SPSS file as .POR format and subsequently read it in to SAS.
> >
> > Issue is Iam not able to read in the value labels from SPSS to SAS.
> > Whats the best approach for the same. I have more than 1000 variables
> > and many such files.
> >
> > I have tried using the trial version of SPSS 14 and saving it as
> > .Sas7bdat and using the option of "Save value labels in to a SAS file"
> > but this way for many variables the variable labels dont come up.
> >
> > I thought that probably saving from SPSS as a SAS Transport file
> > mightdo the trick and in SAS when I wrote the following syntax to read
> > in the newly created transport file "Reading Xpt.xpt"
> >
> > filename xpthand "C:\Documents and Settings\prasadhh\Local
> > Settings\Temp\Temp\Reading Xpt";
> >
> > proc cimport library=work.try infile=xpthand;
> > run;
> >
> > I get the following error
> > 5347 proc cimport library=work.try infile=xpthand;
> > -------- ------
> > 22 202
> > WARNING: The Base Product product with which CIMPORT is associated will
> > expire within 30 days.
> > Please contact your SAS installation representative to have it
> > renewed.
> > ERROR 22-322: Expecting a name.
> > ERROR 202-322: The option or parameter is not recognized and will be
> > ignored.
> > 5348 run;
> >
> >
> > What method should I use so that both value labels and variable lables
> > are being able to read in to SAS.
> >
> > Please guide me
> >
> > Regards,
> > HP
> > India
> >

From: sophe88 on
I often use SPSS or Clementine to write the data set to SAS v8 or
later. I have not had a case where labels are not preseved.

PD
Hari wrote:
> LouisBB wrote:
>
> > Dear HP,
> >
> > Try the Import procedure with SAV as DBMS.
> >
> > proc import datafile='C:\myDirectory\mySpssFile.sav' out=mySasDataset
> > dbms=sav replace; run;
> >
>
> Thanks for the note.
>
> When I try proc Import, I get the following error message:-
>
> 7 proc import datafile="D:\Work\Assorted stuff\My Project\2005\Raw
> Data\2006
> 7 ! 07 07\My project\Product\ProductA_only.sav" out=mySasDataset
> 8 dbms=sav replace;
> ERROR: DBMS type SAV not valid for import.
> NOTE: The SAS System stopped processing this step because of errors.
> NOTE: PROCEDURE IMPORT used (Total process time):
> real time 0.00 seconds
> cpu time 0.01 seconds
>
> 8 ! run;
>
>
> Please note I do have SAS PC License (though its in warning period
> right now).
>
> Regards,
> HP
> India
>
> > http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a000308090.htm
> >
> > LouisBB.
> >
> > "Hari" <excel_hari(a)yahoo.com> wrote in message
> > news:1153729306.992657.325640(a)i3g2000cwc.googlegroups.com...
> > > Hi,
> > >
> > > I have a huge SPSS file which I need to read in to SAS. I have saved
> > > the SPSS file as .POR format and subsequently read it in to SAS.
> > >
> > > Issue is Iam not able to read in the value labels from SPSS to SAS.
> > > Whats the best approach for the same. I have more than 1000 variables
> > > and many such files.
> > >
> > > I have tried using the trial version of SPSS 14 and saving it as
> > > .Sas7bdat and using the option of "Save value labels in to a SAS file"
> > > but this way for many variables the variable labels dont come up.
> > >
> > > I thought that probably saving from SPSS as a SAS Transport file
> > > mightdo the trick and in SAS when I wrote the following syntax to read
> > > in the newly created transport file "Reading Xpt.xpt"
> > >
> > > filename xpthand "C:\Documents and Settings\prasadhh\Local
> > > Settings\Temp\Temp\Reading Xpt";
> > >
> > > proc cimport library=work.try infile=xpthand;
> > > run;
> > >
> > > I get the following error
> > > 5347 proc cimport library=work.try infile=xpthand;
> > > -------- ------
> > > 22 202
> > > WARNING: The Base Product product with which CIMPORT is associated will
> > > expire within 30 days.
> > > Please contact your SAS installation representative to have it
> > > renewed.
> > > ERROR 22-322: Expecting a name.
> > > ERROR 202-322: The option or parameter is not recognized and will be
> > > ignored.
> > > 5348 run;
> > >
> > >
> > > What method should I use so that both value labels and variable lables
> > > are being able to read in to SAS.
> > >
> > > Please guide me
> > >
> > > Regards,
> > > HP
> > > India
> > >

From: my_sas_spot on
I just tried importing a *.sav file to SAS created with SPSS v12 for
Windows using PROC IMPORT and got the same error message:

ERROR: DBMS type SAV not valid for import.

Is there a special license or something else required to do so? It
would save A LOT of time and effort if I don't have to convert SPSS
*.sav files to SPSS *.por files.

Thanks.
Myra

Hari wrote:
> LouisBB wrote:
>
> > Dear HP,
> >
> > Try the Import procedure with SAV as DBMS.
> >
> > proc import datafile='C:\myDirectory\mySpssFile.sav' out=mySasDataset
> > dbms=sav replace; run;
> >
>
> Thanks for the note.
>
> When I try proc Import, I get the following error message:-
>
> 7 proc import datafile="D:\Work\Assorted stuff\My Project\2005\Raw
> Data\2006
> 7 ! 07 07\My project\Product\ProductA_only.sav" out=mySasDataset
> 8 dbms=sav replace;
> ERROR: DBMS type SAV not valid for import.
> NOTE: The SAS System stopped processing this step because of errors.
> NOTE: PROCEDURE IMPORT used (Total process time):
> real time 0.00 seconds
> cpu time 0.01 seconds
>
> 8 ! run;
>
>
> Please note I do have SAS PC License (though its in warning period
> right now).
>
> Regards,
> HP
> India
>
> > http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a000308090.htm
> >
> > LouisBB.
> >
> > "Hari" <excel_hari(a)yahoo.com> wrote in message
> > news:1153729306.992657.325640(a)i3g2000cwc.googlegroups.com...
> > > Hi,
> > >
> > > I have a huge SPSS file which I need to read in to SAS. I have saved
> > > the SPSS file as .POR format and subsequently read it in to SAS.
> > >
> > > Issue is Iam not able to read in the value labels from SPSS to SAS.
> > > Whats the best approach for the same. I have more than 1000 variables
> > > and many such files.
> > >
> > > I have tried using the trial version of SPSS 14 and saving it as
> > > .Sas7bdat and using the option of "Save value labels in to a SAS file"
> > > but this way for many variables the variable labels dont come up.
> > >
> > > I thought that probably saving from SPSS as a SAS Transport file
> > > mightdo the trick and in SAS when I wrote the following syntax to read
> > > in the newly created transport file "Reading Xpt.xpt"
> > >
> > > filename xpthand "C:\Documents and Settings\prasadhh\Local
> > > Settings\Temp\Temp\Reading Xpt";
> > >
> > > proc cimport library=work.try infile=xpthand;
> > > run;
> > >
> > > I get the following error
> > > 5347 proc cimport library=work.try infile=xpthand;
> > > -------- ------
> > > 22 202
> > > WARNING: The Base Product product with which CIMPORT is associated will
> > > expire within 30 days.
> > > Please contact your SAS installation representative to have it
> > > renewed.
> > > ERROR 22-322: Expecting a name.
> > > ERROR 202-322: The option or parameter is not recognized and will be
> > > ignored.
> > > 5348 run;
> > >
> > >
> > > What method should I use so that both value labels and variable lables
> > > are being able to read in to SAS.
> > >
> > > Please guide me
> > >
> > > Regards,
> > > HP
> > > India
> > >