BookmarkSubscribeRSS Feed
gksas
Calcite | Level 5

Hello,

 

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

10 REPLIES 10
Reeza
Super User

Can you provide more details?

 


@gksas wrote:

Hello,

 

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


 

gksas
Calcite | Level 5

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

ballardw
Super User

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.

gksas
Calcite | Level 5

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

Reeza
Super User

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

gksas
Calcite | Level 5

I do not see formats file in libraryformat.png

ballardw
Super User

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.

gksas
Calcite | Level 5
Thanks for the response. SAS support converted to XPT files for me..
Tom
Super User Tom
Super User

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.

 

 

gksas
Calcite | Level 5
Thank you for the response. It was not working and i have contacted sas support and they converted to XPT files.

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
  • 10 replies
  • 1937 views
  • 0 likes
  • 4 in conversation