Convert SCT01 catalog file to SAS dataset

Reply
Occasional Contributor
Posts: 6

Convert SCT01 catalog file to SAS dataset

Hello,

 

I need to convert SCT01 catalog file with formats to SAS dataset/Program. Please help!

Super User
Posts: 21,464

Re: Convert SCT01 catalog file to SAS dataset

Can you provide more details?

 


gksas wrote:

Hello,

 

I need to convert SCT01 catalog file with formats to SAS dataset/Program. Please help!


 

Occasional Contributor
Posts: 6

Re: Convert SCT01 catalog file to SAS dataset

[ Edited ]

I just have catalog file says formats.sct01 and need to convert to something readable. No other details.

Super User
Posts: 12,148

Re: Convert SCT01 catalog file to SAS dataset

If you are referring to a SAS catalog file built in Unix you may be able to open it by making sure it is in a folder associated with a SAS library. If this works then you can use

Proc format library=<lib where the catalog exists> cntlout=lib.dataset;

run;

to get the details of the formats contained there in. If the name of the catalog is not  FORMATS there will need to be a little change to in the proc format to point to the actual catalog name.

 

However the file structures of SAS catalogs are more than a little dependent on which version build them and may not be able to open them without the correct version and operating system. The procedures such as Proc CPORT and CIMPORT are used to prepare catalogs for transfer between OS and SAS versions.

 

If you are attempting to do this without SAS you will likely need very specialized tools and I have no idea which one.

Occasional Contributor
Posts: 6

Re: Convert SCT01 catalog file to SAS dataset

[ Edited ]

Thank you for your response!

I got this error. ERROR: Catalog RAWDATA.FORMATS does not exist.

The file i have is formats.sct01 and have no other information available

Super User
Posts: 21,464

Re: Convert SCT01 catalog file to SAS dataset

When you direct the libname to that folder, what shows up in the library?

Occasional Contributor
Posts: 6

Re: Convert SCT01 catalog file to SAS dataset

I do not see formats file in libraryformat.png

Super User
Posts: 12,148

Re: Convert SCT01 catalog file to SAS dataset

Or post the log with the code assigning the library and the code, assume Proc format you were using to access it.

Paste the log into a code box opened using the forum {I} menu icon to preserve formatting of any warning or error messages.

Occasional Contributor
Posts: 6

Re: Convert SCT01 catalog file to SAS dataset

Thanks for the response. SAS support converted to XPT files for me..
Super User
Super User
Posts: 7,380

Re: Convert SCT01 catalog file to SAS dataset

You might try seeing if you can read it if you specify the right engine on the LIBNAME statement. Looks like version 6 from the filename. If it is the only file in the directory then SAS might be able to pick the engine for you, but if it is mixed into a directory that includes files using current SAS formats then SAS will default the engine to the current engine.

libname test v6 'path to file';
proc format noprint lib=test.formats cntlout=formats; run;

If that doesn't work then do you still have access to version 6 of SAS? Is it running on the same hardware and operating system as was used to create the file?  If not you might need to find a service company that will transform the file for a fee.

 

 

Occasional Contributor
Posts: 6

Re: Convert SCT01 catalog file to SAS dataset

Thank you for the response. It was not working and i have contacted sas support and they converted to XPT files.
Ask a Question
Discussion stats
  • 10 replies
  • 141 views
  • 0 likes
  • 4 in conversation