03-16-2018 05:06 AM
Is there a way to find out information related to a catalog on "Whether it is a 32 bit catalog or 64 bit catalog"???
I have used one macro supplied by Michel Raithel to get the info. However for few of the catalogs created on AIX Operating System.
It is giving the result which is not saying about number of bits.
Any response will be greatly appreciated.
Case 1 : Work well to say 64 bits for one catalog created on Windows
version path filename os
9.0201M0AIX V:\Choudma7_view formats.sas7bcat X64_SR12R2
Case 2 : Donot work for the catalog created on AIX. As it gives the result as
version path filename os
9.0201M0AIX V:\Choudma7_view\temp formats.sas7bcat 0AIX
The available macro to fetch this information As of now:
%if &SYSSCP = WIN %then %let dlm=\;
%else %let dlm=/;
retain flag 0;
length version $120;
infile "&fmt" lrecl=500 truncover;
input theline $500.;
version_loc = findc(theline,'.'); /*9.0401M4X64_SR12R2 avialble in catalog*/
if version_loc > 0 then do;
v = substr(theline,version_loc-1);
if index(v,'6.') then do;
if version ne ' ' and flag=0 then do;
drop theline version_loc rev pos n v flag pos2;
proc print data=catver;
%let fmt=V:\Choudma7_view\temp\formats.sas7bcat; /* Provided Input */
Thanks and regards,
Manoj P. Choudhary
03-16-2018 05:33 AM
03-19-2018 06:31 AM
Thanks for your input. However I need a approach o solve the above program(One I have suggested but showing catalog created on AIX
).Any help will be greatly appreciated.
Thanks & Regards,
03-19-2018 08:45 AM
Here's a simple program that works for most SAS v9x catalogs.
/* replace with path to your catalog file */ filename test "/sas/data/mypath/sasmacr.sas7bcat"; data enc (keep=encoding); length encoding $ 20; infile test truncover scanover; input @'9.0' enc $14.; encoding = '9.0' || enc; output; stop; run;
It reads the encoding signature from the catalog file -- but note that this token does not always indicate the bit architecture. And as far as I know, there isn't a published mapping of these values to platform/architecture values supported by SAS.
Example values you might encounter:
You can use this only as a cue to help determine the provenance of a particular catalog, combined with a knowledge of what operating systems are supported by which versions of SAS.
04-03-2018 03:48 AM
Thanks for your suggestion.Sorry for delay in response.
I got the new approach I am sharing the logic:
Problem : Need to check whether a Catalog is created on 32 bit or 64 Bits OS and display its attributes(Like Catalog name, SAS Version used t create, Host created, Encoding.. etc..)
Consider catalog name as :
a.SAS7bCAT ( Created on 32 Bits OS )
b.SAS7BCAT (Created on 64 Bits OS)
1 Use proc catalog to display the content of A And B catalog. (In case proc catalog is successful for A means 64 bits catalog
in another case Proc catalog with content statement will be failed for Catalog B)
2 Capture the errorCode after proc catalog in code (It will give us Syserr as 0 and 4 for catalogs which are compatible otherwise some different return code).
3 Process further catalogs which are compatible and display its contents (using the approach suggested by Michel in earlier post).