Hello,
I need to convert SCT01 catalog file with formats to SAS dataset/Program. Please help!
Can you provide more details?
@gksas wrote:
Hello,
I need to convert SCT01 catalog file with formats to SAS dataset/Program. Please help!
I just have catalog file says formats.sct01 and need to convert to something readable. No other details.
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.
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
When you direct the libname to that folder, what shows up in the library?
I do not see formats file in library
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.