05-11-2016 10:14 AM
I have a SAS question related to reading character variables from an SPSS file into SAS. As is known that SAS truncates character variables to about 255 characters with spaces. In my case I have a character variable with much more characters in SPSS’s SAV format. I read adding “cvp’” in the libname statement would expand the character variable engine but I am getting an error message as noted below. Any idea if there is another code to use or whether it is better to get the SPSS file in POR as opposed to SAV format would make things better? Thanks!
libname F1 cvp "H:\NP_narratives_F1" cvpbytes=2;
NOTE: Libref F1 was successfully assigned as follows:
Physical Name: H:\NP_narratives_F1; run;
proc import datafile='H:\NP_narratives_F1\NP_F1_CP_narratives201506.sav'
ERROR: Import cancelled. The dataset F1.NP_F1_CP_NARRATIVES is being used and cannot be replaced.
NOTE: The SAS System stopped processing this step because of errors.
05-11-2016 11:09 AM - edited 05-11-2016 11:24 AM
If you have the Library successfully assigned use SAS Explorer to open library. See if your dataset is there. You may not need to "import" something that is accessible using a library.
proc contents data=F1._all_;
to see what may be in your library.
Also the Error could be occuring because the Library statement is "using" the file.