BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MeganE
Pyrite | Level 9

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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.

https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#n0p1yuyzltd52...

 

View solution in original post

8 REPLIES 8
Damo
SAS Employee

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

Kurt_Bremser
Super User

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.

MeganE
Pyrite | Level 9

Thanks. While copying them over and then trying this is an option, they're quite large, one is 60gb.  14gb, 16 gb, etc.

Kurt_Bremser
Super User

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.

MeganE
Pyrite | Level 9

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.

Damo
SAS Employee

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

Tom
Super User Tom
Super User

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.

https://support.sas.com/documentation/cdl/en/ledsoptsref/69751/HTML/default/viewer.htm#n0p1yuyzltd52...

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 2001 views
  • 0 likes
  • 4 in conversation