Hi,
I need to convert some datasets that were created in 32 bit SAS into 64 bit sas (both 9.4). I found proc migrate, but no example i've found lists datasets.
I found:
libname in "path";
libname out base "path"
proc migrate in=in out=out; run;
The datasets i have to convert exist in a library with 100s of other datasets. I can't migrate the entire library.
Does anyone know how to convert just 5 of the datasets? Where to list them? I'm not seeing any examples of code with a leading key word like "var" in proc print or "tables" in proc freq or "delete or change" in proc datasets.
Thanks
Megan
EDIT: Solved. Thanks guys!
For such a simple issue no need to use PROC MIGRATE. You should be able to do it using PROC COPY.
If you are running the conversion using the target 64bit version of SAS then just make a new library and copy the files.
libname old 'directory with 32bit files';
libname new 'directory for 64bit files';
proc copy inlib=old outlib=new datecopy noclone ;
run;
Otherwise use the OUTREP= option to tell SAS what format to create.
Hi @MeganE
The CPORT/CIMPORT procedures might be what you're looking for.
With the CPORT proc, you can select your SAS Files, furtehr details are available here http://support.sas.com/documentation/cdl/en/proc/70377/HTML/default/viewer.htm#p0v36fq2v53pv8n1042qy...
Hope that helps.
Cheers,
Damo
Move the datasets in question to a new library, run proc migrate there, and copy back.
AFAIK, 32-bit datasets should be readable anyway, they just use CEDA. So you could simply rename the datasets first, then use a data step to recreate them as 64-bit, then remove the renamed dataset.
Thanks. While copying them over and then trying this is an option, they're quite large, one is 60gb. 14gb, 16 gb, etc.
If you can read them (what I suppose), rename them with proc datasets and then do a simple
data whatever;
set _whatever;
run;
and then remove the renamed instances.
proc migrate will also do a complete read/write, so the overall load should be the same.
Don't forget to add the compress=yes option if the datasets are already compressed. If they are not yet compressed, consider using the option. You might save lots of disk space.
But what is the proc migrate code. So far, through all of my googling and asking, all i can find on proc migrate is converting an entire libarary. As like i said in my original post, i can't migrate the entire library. There are 100s of datasets in there and i just need to migrate 5. How do you list the datasets out? I can't find that part anywhere.
So you don't know yet which ones need to be converted?
Hi @MeganE
The documentation for the MIGRATE procedure states "Migrates a SAS library forward to the current release of SAS.", you can't select individual datasets.
Not sure if it's the best option but the CPORT proc will let you select datasets you want to migrate.
Then the CIMPORT will read the transport file, for instance
filename test "c:\temp\test.cpo";
proc cport lib=sashelp file=test;
select cars class;
run;
proc cimport infile=test library=work;
run;
Cheers,
Damo
For such a simple issue no need to use PROC MIGRATE. You should be able to do it using PROC COPY.
If you are running the conversion using the target 64bit version of SAS then just make a new library and copy the files.
libname old 'directory with 32bit files';
libname new 'directory for 64bit files';
proc copy inlib=old outlib=new datecopy noclone ;
run;
Otherwise use the OUTREP= option to tell SAS what format to create.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.