<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Viewing contents of catalog files in SAS Studio in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/339175#M272392</link>
    <description>&lt;P&gt;Assuming your formats catalog is in library&amp;nbsp;cmshccfm and you have the formats names&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then use next code to get the format details:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format lib=cmshccfm;
  select AGEL AGEU  ;    /* any format list */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tested it with SAS UE.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 11:38:48 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2017-03-08T11:38:48Z</dc:date>
    <item>
      <title>Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/335946#M272391</link>
      <description>&lt;P&gt;Hello SAS'ers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working with a catalog file I got from the CMS website (checking out their HCC risk model &lt;A href="https://www.cms.gov/Medicare/Health-Plans/MedicareAdvtgSpecRateStats/Risk-Adjustors.html" target="_blank"&gt;https://www.cms.gov/Medicare/Health-Plans/MedicareAdvtgSpecRateStats/Risk-Adjustors.html&amp;nbsp;&lt;/A&gt; After downloading and unzipping the files I came across one called "F221690P".&amp;nbsp; I managed to determine that it is a catalog file.&amp;nbsp; When I run the following code,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;filename inf "/folders/myfolders/sasuser.v94/2017/F221690P";
libname cmshccfm "/folders/myfolders/sasuser.v94/2017";
proc cimport library=cmshccfm infile=inf;
run;&lt;/PRE&gt;&lt;P&gt;I notice a file called formats.sas7bcat appears in the file browser on the left (I'm using SAS Studio University Eddition).&amp;nbsp; I've also been able to see some high level data about the catalog using the following code,&lt;/P&gt;&lt;PRE&gt;proc catalog catalog = cmshccfm.formats;
contents stat;
run;&lt;/PRE&gt;&lt;P&gt;that produces output that looks like this ...&lt;/P&gt;&lt;PRE&gt;#       Name            Type            Create Date             Modified Date           Description                                             PgSi    BlkSi   NmBlk   LBB     LBS    Pages&lt;BR /&gt;1 	AGEL 	        FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:46:21 	Age should be greater or equal to the format number 	4096 	4096 	1 	405 	508 	1
2 	AGEU 	        FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:46:21 	Age should be less or equal to the format number 	4096 	4096 	1 	407 	508 	1
3 	AGE_EDITS 	FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:46:21 	MCE AGE EDIT CATEGORIES 	                        4096 	4096 	1 	490 	1016 	1
4 	FSEX 	        FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:46:21 	SEX CATEGORIES 	                                        4096 	4096 	1 	314 	508 	1
5 	I0AGEY16MCE 	FORMATC 	09/04/2015 15:46:20 	09/04/2015 15:46:21 	ICD10 list for MCE AGE FY 2016 EDITS 	                4096 	4096 	5 	2089 	2286 	5
6 	I0DUPV22Y16RC 	FORMATC 	09/04/2015 15:46:20 	09/04/2015 15:46:21 	FY 2016 ICD10: duplicate assignments to CC V22 	        4096 	4096 	3 	323 	508 	3
7 	I0SECV22Y16RC 	FORMATC 	09/04/2015 15:46:20 	09/04/2015 15:46:21 	FY 2016 ICD10: secondary assignments to CC V22 	        4096 	4096 	1 	465 	508 	1
8 	I0SEXY16MCE 	FORMATC 	09/04/2015 15:46:21 	09/04/2015 15:46:21 	ICD10 list for MCE SEX FY 2016 EDITS 	                4096 	4096 	2 	2275 	2540 	2
9 	I0V22Y16RC 	FORMATC 	09/04/2015 15:46:19 	09/04/2015 15:46:21 	FY 2016 ICD10 xwalk to CC V22 	                        4096 	4096 	111 	2256 	2540 	111
10 	I9AGEY15MCE 	FORMATC 	09/04/2015 15:46:02 	09/04/2015 15:46:21 	ICD9 list for MCE AGE FY 2015 EDITS 	                4096 	4096 	1 	1503 	2032 	1
11 	I9DUPV22Y15RC 	FORMATC 	09/04/2015 15:46:01 	09/04/2015 15:46:21 	FY 2015 ICD9: duplicate assignments to CC V22 	        4096 	4096 	1 	409 	508 	1
12 	I9SEXY15MCE 	FORMATC 	09/04/2015 15:46:02 	09/04/2015 15:46:21 	ICD9 list for MCE SEX FY 2015 EDITS 	                4096 	4096 	1 	2653 	3048 	1
13 	I9V22Y15RC 	FORMATC 	09/04/2015 15:46:01 	09/04/2015 15:46:21 	FY 2015 ICD9 xwalk to CC V22 	                        4096 	4096 	39 	2706 	3048 	39
14 	TABLE_AGE 	FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:45:46 	  	                                                4096 	4096 	1 	390 	508 	1
15 	TABLE_SEX 	FORMATC 	09/04/2015 15:45:46 	09/04/2015 15:45:46 	  	                                                4096 	4096 	1 	290 	508 	1&lt;/PRE&gt;&lt;P&gt;This seems to be equivalent to what the code snippet "List Catalog Entries" produces.&amp;nbsp;&amp;nbsp; My question is how do I see the format numbers associated with these entries?&amp;nbsp; For example, the first two entries AGEU and AGEL are upper and lower age limits for a particular model.&amp;nbsp; I might be misunderstanding what is actually in this catalog file, but I feel like there is more information to see, I just dont know the commands I need to give in order to see it.&amp;nbsp; Any help appreciated! I'm attaching the file in case anyone wants to poke around on their system (note that I had to add the "txt" extension so the system would accept the upload.&amp;nbsp; in the zipfile on the CMS website the file has not extension).&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 04:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/335946#M272391</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-02-26T04:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/339175#M272392</link>
      <description>&lt;P&gt;Assuming your formats catalog is in library&amp;nbsp;cmshccfm and you have the formats names&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then use next code to get the format details:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format lib=cmshccfm;
  select AGEL AGEU  ;    /* any format list */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tested it with SAS UE.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 11:38:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/339175#M272392</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-08T11:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/339298#M272393</link>
      <description>&lt;P&gt;You don't have to know or type in all of the variables. The following will also work (although you'd have to change the libname):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format lib=work.formats;
  select a-zzzzzzzz  $a-$zzzzzzzz;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 16:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/339298#M272393</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-08T16:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340191#M272394</link>
      <description>&lt;P&gt;Thanks Art!&amp;nbsp; That does indeed expose the details I was looking for in the file.&amp;nbsp; On the off chance that anyone else is working with the CMS HCC risk models and stumbles on this question here is the full code snippet I used,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename inf "/folders/myfolders/sasuser.v94/2017/F221690P";
libname cmshccfm "/folders/myfolders/sasuser.v94/2017";
proc cimport library=cmshccfm infile=inf;
run;

proc catalog catalog = cmshccfm.formats;
contents stat;
run;

proc format lib=cmshccfm.formats;
  select a-zzzzzzzz  $a-$zzzzzzzz;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output of that last "proc format" statement looks like this in SAS Studio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                            ----------------------------------------------------------------------------                            
                            |       FORMAT NAME: $AGEL    LENGTH:    2   NUMBER OF VALUES:    5        |                            
                            |   MIN LENGTH:   1  MAX LENGTH:  40  DEFAULT LENGTH:   2  FUZZ:        0  |                            
                            |--------------------------------------------------------------------------|                            
                            |START           |END             |LABEL  (VER. V7|V8   04SEP2015:15:45:46)|                            
                            |----------------+----------------+----------------------------------------|                            
                            |0               |0               |0                                       |                            
                            |1               |1               |0                                       |                            
                            |2               |2               |12                                      |                            
                            |3               |3               |15                                      |                            
                            |**OTHER**       |**OTHER**       |-1                                      |                            
                            ----------------------------------------------------------------------------                            
                                                                                                                                    
                                                                                                                                    
                            ----------------------------------------------------------------------------                            
                            |       FORMAT NAME: $AGEU    LENGTH:    3   NUMBER OF VALUES:    5        |                            
                            |   MIN LENGTH:   1  MAX LENGTH:  40  DEFAULT LENGTH:   3  FUZZ:        0  |                            
                            |--------------------------------------------------------------------------|                            
                            |START           |END             |LABEL  (VER. V7|V8   04SEP2015:15:45:46)|                            
                            |----------------+----------------+----------------------------------------|                            
                            |0               |0               |0                                       |                            
                            |1               |1               |17                                      |                            
                            |2               |2               |55                                      |                            
                            |3               |3               |999                                     |                            
                            |**OTHER**       |**OTHER**       |-1                                      |                            
                            ----------------------------------------------------------------------------                            
                                                                                                                                    
                                                                                                                                    
                            ----------------------------------------------------------------------------                            
                            |                    FORMAT NAME: $AGE_EDITS LENGTH: 23                    |                            
                            |   MIN LENGTH:   1  MAX LENGTH:  40  DEFAULT LENGTH:  23  FUZZ:        0  |                            
                            |--------------------------------------------------------------------------|                            
                            |START           |END             |LABEL  (VER. 9.4     04SEP2015:15:45:46)|                            
                            |----------------+----------------+----------------------------------------|                            
                            |0               |0               |0 newborn (age 0)                       |                            
                            |1               |1               |1 pediatric (age 0 -17)                 |                            
                            |2               |2               |2 maternity (age 12-55)                 |                            
                            |3               |3               |3 adult (age 14+)                       |                            
                            |**OTHER**       |**OTHER**       |                                        |                            
                            ---------------------------------------------------------------------------- &lt;/PRE&gt;&lt;P&gt;Follow up question, would it be possible to dump this to some form of human readable file (csv perhaps)?&amp;nbsp; Actually I suppose I could simply copy and paste this plain text from the SAS Studio "Results" page, but would be geat to have it dumped to a file.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 22:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340191#M272394</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-03-11T22:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340193#M272395</link>
      <description>&lt;P&gt;Actually, I should have looked at the SAS Studio interface for more than a few seconds.&amp;nbsp; There are buttons to download in html, rtf, and pdf.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 22:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340193#M272395</guid>
      <dc:creator>galtay</dc:creator>
      <dc:date>2017-03-11T22:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Viewing contents of catalog files in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340194#M272396</link>
      <description>&lt;P&gt;Alternatively, you could download it to a SAS dataset. Then you could change it, run it, and/or export it to a csv or whatever kind of file you want. e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format lib=work.formats cntlout=want;;
  select a-zzzzzzzz  $a-$zzzzzzzz;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 22:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Viewing-contents-of-catalog-files-in-SAS-Studio/m-p/340194#M272396</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-11T22:43:08Z</dc:date>
    </item>
  </channel>
</rss>

