BookmarkSubscribeRSS Feed
MinaChen
Calcite | Level 5

Recently I met an issue about moving formats.catalog from WINDOWs SAS9.2 32-bit to UNIX SAS9.2 32-bit. I created a sas dataset with customized formats using proc format in windows sas, then I want to transfer them to the sas in unix server. In addition to the methods cport/cimport, save the formats into a dataset, I also noticed that proc upload can upload both dataset and formats.catalog from windows to unix from many papers.

Then I tried to use "proc upload" method and the dataset and formats.catalog can be moved to unix server successfully. But the catalog cannot be opened due to the error message "file formats.catalog was created for a different operating system".

It seems that proc upload cannot transfer customized formats between different operating systems, so why there are so many papers introduced this method to transfer catalogs? Could someone give me some confirmation or suggestions?

Thanks!

6 REPLIES 6
jakarman
Barite | Level 11

proc upload does support catalogs af and many more. Formats are just one of the many SAS catalog types. 

As you can also flat files (binary) the approach can be confusing. There is something with CEDA native/foreign fata types.

If you transfer the data-structure between identical OS and SAS versions (native format) you can make an indentical copy (binary file transfer).

This method is also usefull with catalogs in a release management approach (D,T,A,P) when deploying the release (version) in a exact copy.

If you transfer the data-data structure and the OS or SAS version is different (foreign format) than mostly a conversion is needed.

SAS/CONNECT(R) 9.3 User's Guide (proc upload) the Data set options and catalog options is the method supporting that.

For catalogs it is supporting adding members in a way not available with "proc catalog".

Catalogs are members in a SAS library and you can see them existing aside the SAS datasets(tables)  

The RLS approach is one step more as you can see/update members in a SAS-library.

The limitations are:

- with a remote foreign library the update is not possible

- Using a RLS for eg formats is not possible.

- foreign SAS datasets do not support record locking/update

The CEDA was part of SAS/Connect with SAS V6. Now it is part of SAS Foundation.

Suppose you want to create a SAS dataset for an other OS or SAS version, that is possible with that.

---->-- ja karman --<-----
MinaChen
Calcite | Level 5

Hi Jaap,

Thanks for your quick response.

As UPLOAD Procedure provids Catalog options (incat, outcat), it assumes that I can upload formats.catalog via catalog options:

RSUBMIT;

LIBNAME remote 'library-path';run;

proc upload data=local.avisit1  out=remote.avisit1 ;

run;

proc upload incat=local._all_  outcat=remote._all_ ;

run;

ENDRSUBMIT;

The formats.catalog can be uploaded successfully but can not be opened. So for different OS, formats.catalog cannot be moved vis UPLOAD procedure?

捕获.JPG

RichardinOz
Quartz | Level 8

If you still have difficulty with the upload process you might consider creating a format control file (here, for the LIBRARY library) in the current environment

Proc format library= LIBRARY cntlout = work.formatlib ; run

Then upload the SAS dataset created, just like any other SAS dataset

In the remote environment

Rsubmit ;

Proc format library= LIBRARY cntlin = work.formatlib ; run

Richard

MinaChen
Calcite | Level 5

Hi Richard,

Thanks for your response.

I know the formats can be moved and opened successfully by converting to a dataset. I am just confused with Catalog options in the UPLOAD procedure. The problem is that we can upload formats.catalog via Catalog options (incat, outcat) from the client to the server, but we can not open it on the server. So what's the purpose of the catalog options in the UPLOAD procedure?

jakarman
Barite | Level 11

As you have uploaded it and the log of the proc upload is telling you it was succesfull. The formats are well on the other Unix machine.

Running the SAS processes on Unix you can use that library. No problem with that.

You cannot use the Unix library with RLS in you local (windows) session still needing a Windows version there.

I you want to copy catalog to Unix and than use those in Windows that is not always possible.

To solve that the design should be making a complete logical synchronization of the contents.  

Would you use catalog member of type source/log/list the equivalents of the common used text-files sas/log/lst does allow more.

I did environments mixing up Windows/Unix/mainframe this way making it all transparent for common usage. Some quirks as exceptions (up/lowcase).

---->-- ja karman --<-----
jakarman
Barite | Level 11

IF you want to list the content of catalog in a remote library, as you cannot browse/see that always.

Use Base SAS(R) 9.3 Procedures Guide, Second Edition (proc catalog contents) in a remote submit block

---->-- ja karman --<-----

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
  • 6 replies
  • 2062 views
  • 1 like
  • 3 in conversation