![]() | ![]() | ![]() | ![]() | ![]() |
This sample determines the version of SAS and the operating system under which a catalog was created. This might be helpful when an error like the following is received:
ERROR: File MYLIB.FORMATS.CATALOG was created for a different operating system
Cross Environment Data Access (CEDA) is not supported for SAS catalogs. A catalog must be read in the operating system under which it was created.
This sample program reads the header records of the catalog, and provides you with the information you need to find a compatible operating system running SAS software to convert the catalog. You can then use PROC CPORT on the source machine to export the catalog, and PROC CIMPORT on the target machine to import it.
You can also use PROC FORMAT to create a control data set which can be moved to your target machine and used as input to recreate the format catalog. For an example of this, see SAS Note 22194.
The sample program on the Full Code tab creates a test format and produces a report of the host operating system and version of SAS.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
ERROR: File MYLIB.FORMATS.CATALOG was created for a different operating system
/* Create a format in the WORK library. */
%let x= %sysfunc(getoption(work));
proc format lib=work;
value testfmt
1='Yes'
2='No'
3='N/A'
;
run;
/* Read the catalog version and operating system. */
options nodate nonumber;
filename fmt %str("&x./formats.sas7bcat");
data x;
length version $120;
infile fmt lrecl=1000 truncover;
input theline $1000.;
test=substr(theline,210,20);
test2=test;
format test2 $hex40.;
if _n_ =1 then do;
version_loc = index(theline,'2E'x);
if version_loc>0 then do
version = substr(theline,version_loc-5,30);
end;
end;
if version ne ' ' then output;
keep version;
run;
/* Display the SAS version and operating system. */
proc print data=x;
run;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
The SAS System
Obs Version and Operating System
1 9.0101M3XP_PRO
* This should reflect the SAS version and operating system you are using.| Type: | Sample |
| Date Modified: | 2009-09-03 11:26:34 |
| Date Created: | 2009-01-11 14:16:40 |
| Product Family | Product | Host | SAS Release | |
| Starting | Ending | |||
| SAS System | N/A | z/OS | ||
| OpenVMS VAX | ||||
| Macintosh | ||||
| Macintosh on x64 | ||||
| Microsoft Windows 2000 Professional | ||||
| Microsoft® Windows® for 64-Bit Itanium-based Systems | ||||
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | ||||
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | ||||
| Microsoft Windows XP 64-bit Edition | ||||
| Microsoft® Windows® for x64 | ||||
| OS/2 | ||||
| Microsoft Windows 95/98 | ||||
| Microsoft Windows 2000 Advanced Server | ||||
| Microsoft Windows 2000 Datacenter Server | ||||
| Microsoft Windows 2000 Server | ||||
| Microsoft Windows NT Workstation | ||||
| Microsoft Windows Server 2003 Datacenter Edition | ||||
| Microsoft Windows Server 2003 Enterprise Edition | ||||
| Microsoft Windows Server 2003 Standard Edition | ||||
| Microsoft Windows Server 2008 | ||||
| Microsoft Windows XP Professional | ||||
| Windows Millennium Edition (Me) | ||||
| Windows Vista | ||||
| 64-bit Enabled AIX | ||||
| 64-bit Enabled HP-UX | ||||
| 64-bit Enabled Solaris | ||||
| ABI+ for Intel Architecture | ||||
| AIX | ||||
| HP-UX | ||||
| HP-UX IPF | ||||
| IRIX | ||||
| Linux | ||||
| Linux for x64 | ||||
| Linux on Itanium | ||||
| OpenVMS Alpha | ||||
| OpenVMS on HP Integrity | ||||
| Solaris | ||||
| Solaris for x64 | ||||
| Tru64 UNIX | ||||





