05-08-2014 04:18 AM
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?
05-08-2014 04:54 AM
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.
05-08-2014 06:19 AM
Thanks for your quick response.
As UPLOAD Procedure provids Catalog options (incat, outcat), it assumes that I can upload formats.catalog via catalog options:
LIBNAME remote 'library-path';run;
proc upload data=local.avisit1 out=remote.avisit1 ;
proc upload incat=local._all_ outcat=remote._all_ ;
The formats.catalog can be uploaded successfully but can not be opened. So for different OS, formats.catalog cannot be moved vis UPLOAD procedure?
05-08-2014 05:16 AM
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
Proc format library= LIBRARY cntlin = work.formatlib ; run
05-08-2014 06:37 AM
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?
05-08-2014 06:48 AM
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).
05-08-2014 06:51 AM
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