DATA Step, Macro, Functions and more

open formats in 64bit (from 32 bit)

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 121
Accepted Solution

open formats in 64bit (from 32 bit)

Hi!  I am trying to open formats that were created in 32 bit, but I can figure out how to do this?!  I have the syntax that I run containing all the formats so I can work with the tables.  But since My computer upgraded, I cannot run the formats.

 

So, say my syntax is saved as:  H:\file\read formats.sas

 

I tried using cimport....but not working correctly.  I may be doing this totally wrong.  I'm not clear on how/ where I should be creating new or temp files and what to replace...   

 

Thanks for your help!!

 

libname project "H:\File";
 filename formats "H:\File\read formats.cpt";

 proc cport library=project file=formats;
 run;


libname project "H:\File";
 filename outfile "H:\file\read formats.cpt";

 proc cimport library=project file=outfile;
 run;

Accepted Solutions
Solution
‎03-08-2016 01:43 PM
Super User
Posts: 10,483

Re: open formats in 64bit (from 32 bit)

Your best bet is to run the code that generated the formats originally.

 

Next would be to run proc format with the cntlout option on a 32 bit machine that can read the formats. Then you use the created dataset with the Cntlin option on proc format to create the formats.

 

Other options are pretty much all going to start with the a 32 bit machine to read them.

 

Catalogs are generally not cross platform accessible and the formats are one of those.

View solution in original post


All Replies
Solution
‎03-08-2016 01:43 PM
Super User
Posts: 10,483

Re: open formats in 64bit (from 32 bit)

Your best bet is to run the code that generated the formats originally.

 

Next would be to run proc format with the cntlout option on a 32 bit machine that can read the formats. Then you use the created dataset with the Cntlin option on proc format to create the formats.

 

Other options are pretty much all going to start with the a 32 bit machine to read them.

 

Catalogs are generally not cross platform accessible and the formats are one of those.

Super User
Posts: 5,256

Re: open formats in 64bit (from 32 bit)

CIMPORT should work, but your CPORT must be done from a SAS 32 bit session.

Also, you libname must point to your library where your format catalog is stored. Is that really in directory "File"?

Data never sleeps
Super User
Super User
Posts: 7,398

Re: open formats in 64bit (from 32 bit)

Yes, you have hit a good examplpe of why not to use proprietary file formats.  Unfortunately there is no way to open a 32bit catalog on a 64bit install, and vice versa.  You would need to, as @LinusH and @ballardw have suggested, go back to the source, and resend the information in a non-proprietary format, suuch as plain text program, and then recreate that in the new bit install.  This really highlights why we should all be moving away from these formats, to plain open formats which can be read across operating systems/machines and as such can be used as a reason to keep formats and such like in text files, which can be built at startup, rather than catalogs.  I for instance have a backlog of studies which, for one reason or another, I only have catalogs containing macros and formats which are now nothing more than dea files, and programs which do not work anymore because of them, and i have no way of going back to source.

Open file formats!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 224 views
  • 1 like
  • 4 in conversation