Summary File 3 Profiles - SAS Version (original ReadMe dated Aug 9 with three updates below: 8/13, 8/14, 9/16) PROGRAM DESCRIPTION: These programs were developed by a collaboration of State Data Centers nationwide to produce a set of standard State Data Center program profiles from Census 2000 Summary File 3. The files are made available to all members of the SDC/BIDC Network via the SDC/BIDC Web Clearinghouse (www.sdcbidc.iupui.edu). UPDATES AND NOTIFICATIONS: The SDC/BIDC (SDC-L) List Serve will be the primary means of communicating revisions to these programs. All lead and coordinating members of the network are automatically part of that list serve and affiliate organizations can request access by contacting their lead agency. The SDC/BIDC Web Clearinghouse will be the download site for the programs. Any and all revisions will be noted in the "revision notes" file available on the Profile page devoted to these programs. www.sdcbidc.iupui.edu - click on "Profiles" on the navigation bar. CREDITS: Roy Williams of MISER, the lead agency of the Mass. SDC was the SAS Team Leader for this SAS version. He can be contacted with questions, comments and suggestions at (413) 545-3460 or . The other team members were: Julie Hoang (CA), Jeff Wallace (OK), Xan Stevens (KS), Phyllis Smith and her staff (AK), Amy Chen (MD), Sue Copella, Larry Meyers and others at Penn State (PA), and Annette Boyer (CO). The content design team included Karen Lamphere & Julie Hoang (CA), Jane Traynham (MD), David Joye (NJ), Orlando Rodriguez (CT) and Carol Rogers (IN), and Bob Scardamalia (NY), the latter two serving as co-chairs for the SDC 2k Products subcommittee of the SDC/BIDC Steering Committee. Julie Hoang, Lenny Gaines (NY), Betty Brown (FL) and Roy Williams also made substantial contributions to the final designs at the coding stage. Bob Scardamalia in consultation with his NY SDC staff and affiliates made the difficult initial decisions concerning how to assign the SF3 tables to the various modules. SPECIFICS: The program assumes the user has already created SAS (Version 8.0 or higher) data set(s) using John Blodgett's CnvtSF3.sas as described on this web site. SASProfileCodeAug8.zip contains: Name Mnemonic Pages Modified Size Ratio Packed MainSF3.sas 8/8/2002 3:17pm 12,766 60% 5,135 PrimeProf.sas 1 11 8/6/2002 10:04pm 100,214 77% 22,693 secprof.sas 2 4 7/25/2002 6:30pm 43,045 77% 9,720 AncyProf.sas A 3 8/2/2002 5:26pm 20,992 76% 4,950 Disprof.sas D 6 8/8/2002 2:58pm 70,670 82% 12,731 EducProf.sas E 2 8/6/2002 3:01pm 13,355 75% 3,389 familyprof.sas F 1 7/25/2002 7:37pm 9,840 77% 2,278 HousProf.sas H 4 8/2/2002 12:55pm 43,669 75% 10,864 IncProf.sas I 8 8/2/2002 6:03pm 40,782 81% 7,874 JobsProf.sas J 3 8/6/2002 4:25pm 25,959 81% 4,924 LangProf.sas L 3 8/6/2002 7:06pm 25,283 76% 6,181 migrprof.sas M 3 7/25/2002 7:30pm 16,273 77% 3,724 Povprof.sas P 8 8/8/2002 2:52pm 82,712 80% 16,600 tranprof.sas T 2 8/6/2002 7:22pm 19,097 75% 4,797 (58 pp. total) county.sas 5/21/2001 5:00pm 107,286 74% 28,033 Geocomp.sas 6/6/2001 4:32pm 9,178 89% 1,021 Geocompbrief.sas 6/7/2001 10:07am 5,368 83% 919 sumlev.sas 8/7/2002 3:46pm 4,902 81% 955 SF3Template.sas 7/15/2002 3:49pm 1,227 57% 529 CalcMedian.sas 4/5/2002 12:26pm 3,722 59% 1,508 20 files total 656,340 77% 148,825 MainSF3.sas is the main program, the one you actually look at, edit and invoke to generate profiles. It calls up one or more of the 13 modules (PrimeProf.sas, SecProf.sas, AncyProf.sas, etc.) according to the value of the parameter "profiles". Each module has a one-character mnemonic number or letter associated with it for purposes of selection. The 13 mnemonics are shown in the listing above. For example if you %LET profiles=12HIP, you are asking for the Primary, Secondary, Housing, Income, & Poverty profiles. If you leave it blank (i.e., give it the value "null") you are asking for all 13 modules. By default, you get all the pages of each module, but there is a similar parameter for each module which allows you to select which pages of each module should be generated. PrimeProf.sas thru TranProf.sas are the modules that generate the actual pages of the profiles. MainSF3 expects to find them in the same directory and with those names. The files county.sas, sumlev.sas, and geocomp.sas (or Geocompbrief.sas) contain the VALUE statements used to generate the $county, $sumlev and $geocomp. formats used by the HeadFoot routine (part of MainSF3) which puts in the page headers. You will need to run a Proc Format %INCLUDE'ing those files before you can run MainSF3 (only once if you save the resulting formats in a format library by running Proc Format with LIBRARY=LIBRARY.) The file SF3Template.sas contains a Proc Template run which creates an ODS "style" called SF3Style. This is used for proper formatting of the direct PostScript/PDF output when the ODS PS statement is active. This Proc only needs to be run once. The file CalcMedian.sas is not currently used by the program, but may eventually be useful in calculating medians when MainSF3 is run on custom-aggregated areas for which no median is in the data set. ----------------------------------------------------------------------------- Directions for running MainSF3 are contained in comments in the file (still somewhat rudimentary at this point--feedback would be appreciated). This is the only file that needs to be modified. It contains a single SAS data step. The user needs to specify various parameters at the top (before the DATA _NULL_ statement) such as the path to the data set(s) and the parameters which control which modules (and which pages of those modules) get printed. After the DATA _NULL_ statement the user needs to edit the SET or MERGE statement with the name of the data set(s) to be read and a WHERE statement to select the geographic areas to be profiled. For example: WHERE sumlev IN ('040','050','060'); would cause profiles to be generated for the 3 specified geographic summary levels (all states, counties and county subdivisions in the file.) If you wanted to print profiles for a specific city (such as Montpelier, VT) you could use: WHERE sumlev = '160' AND areaname =: 'Montpelier'; Note the colon (:) after the equal sign. This says to test to see if the name begins with 'Montpelier'. The full areaname would contain the place type (it would be 'Montpelier city') but using the "short compare" operator lets you not have to worry about the exact value. SYSTEM REQUIREMENTS: You must have SAS Version 8.0 or above since we use variable names longer than 8 characters. Testing was with version 8.2 but the only thing we used which was not in 8.0 is the optional use of the ODS (Output Delivery System) to write the output semi-directly to pdf. Comment out the ODS PS statement and the %INCLUDE "SF3Template.sas" if you don't have Version 8.2. The use of ODS was tested in a Windows 2000 environment running SAS in Display Manager mode. It may require some tweaking or it may not work at all in some other environments. The generated modules are also sent to the standard PRINT destination (in Display Manager mode the Output window.) Users should be able to "print" to a pdf file from there, so long as Adobe Distiller or Adobe Writer are installed as "printers" available to SAS. The profile-generating program requires much less in system resources than did the initial conversion step. If you were able to save the output of the conversion step as permanent SAS data files, then running profiles should not require extraordinary resources or take too much time. It will depend, of course, on how many profiles you are generating. ------------- cor/rew August 9, 2002 -------------------------------------------------------------------------------- 8/13/2002 Update Announcement (read the above ReadMe first!) contents of SASProfileCodeAug13.zip Name Modified Size Ratio Packed sumlev.sas 8/13/2002 5:23PM 5,151 78% 1,129 county.sas 8/13/2002 5:22PM 107,322 74% 28,084 Geocomp.sas 8/13/2002 5:21PM 9,368 88% 1,159 Geocompbrief.sas 8/13/2002 5:11PM 5,525 81% 1,026 HousProf.sas 8/13/2002 4:56PM 43,656 75% 10,894 JobsProf.sas 8/12/2002 5:52PM 25,985 81% 4,955 Povprof.sas 8/12/2002 5:25PM 88,542 80% 17,665 tranprof.sas 8/12/2002 12:55PM 19,218 75% 4,872 MainSF3.sas 8/8/2002 3:17PM 12,766 60% 5,135 Disprof.sas 8/8/2002 2:58PM 70,670 82% 12,731 PrimeProf.sas 8/6/2002 10:04PM 100,214 77% 22,693 LangProf.sas 8/6/2002 7:06PM 25,283 76% 6,181 EducProf.sas 8/6/2002 3:01PM 13,355 75% 3,389 IncProf.sas 8/2/2002 6:03PM 40,782 81% 7,874 AncyProf.sas 8/2/2002 5:26PM 20,992 76% 4,950 familyprof.sas 7/25/2002 7:37PM 9,840 77% 2,278 migrprof.sas 7/25/2002 7:30PM 16,273 77% 3,724 secprof.sas 7/25/2002 6:30PM 43,045 77% 9,720 SF3Template.sas 7/15/2002 3:49PM 1,227 57% 529 CalcMedian.sas 4/5/2002 12:26PM 3,722 59% 1,508 20 file(s) 662,936 77% 150,496 One actual correction: two totals on the first page of the Jobs profile were using the wrong variables. Minor improvements: Possible division by zero is now checked in Poverty & Transportation. (Eliminates possibility of warning notes in the log.) One header line clarified in Housing-2 The four formats (sumlev.sas, county.sas, Geocomp.sas, & Geocompbrief.sas) now contain only the VALUE statement, with a comment saying to bracket with a PROC FORMAT LIBRARY=LIBRARY statement and RUN statement. --- rew/Aug13 -------------------------------------------------------------------------------- 8/14/2002 Update Announcement (read the above ReadMe first!) 8/14/2002 6:58PM contents of SASProfileCodeAug14.zip Name Modified Size Ratio Packed MainSF3.sas 8/14/2002 6:56PM 14,603 60% 5,770 Titles.txt 8/14/2002 5:55PM 5,000 68% 1,607 formats.sas7bcat 8/14/2002 5:53PM 431,104 82% 75,560 PrimeProf.sas 8/14/2002 5:12PM 100,218 77% 22,699 Povprof.sas 8/14/2002 3:04PM 88,705 80% 17,705 HousProf.sas 8/14/2002 2:48PM 43,704 75% 10,901 sumlev.sas 8/13/2002 5:23PM 5,151 78% 1,129 county.sas 8/13/2002 5:22PM 107,322 74% 28,084 Geocomp.sas 8/13/2002 5:21PM 9,368 88% 1,159 Geocompbrief.sas 8/13/2002 5:11PM 5,525 81% 1,026 JobsProf.sas 8/12/2002 5:52PM 25,985 81% 4,955 tranprof.sas 8/12/2002 12:55PM 19,218 75% 4,872 Disprof.sas 8/8/2002 2:58PM 70,670 82% 12,731 LangProf.sas 8/6/2002 7:06PM 25,283 76% 6,181 EducProf.sas 8/6/2002 3:01PM 13,355 75% 3,389 IncProf.sas 8/2/2002 6:03PM 40,782 81% 7,874 AncyProf.sas 8/2/2002 5:26PM 20,992 76% 4,950 familyprof.sas 7/25/2002 7:37PM 9,840 77% 2,278 migrprof.sas 7/25/2002 7:30PM 16,273 77% 3,724 secprof.sas 7/25/2002 6:30PM 43,045 77% 9,720 SF3Template.sas 7/15/2002 3:49PM 1,227 57% 529 CalcMedian.sas 4/5/2002 12:26PM 3,722 59% 1,508 22 files 1,101,092 79% 228,351 Important correction (this one was major, affecting whole first column): Totals column, bottom panel of Poverty page-8 was calculated using invalid variables Minor improvements: MainSF3 & Primary now allow lower-case in profile & page selection parameters Fuller documentation in MainSF3. MainSF3 now has an explicit ProcFormat run (commented out--users should run once) Minor additions to package: (1) Text file "Titles.txt" with the page titles for all 58 pages. Print it out as a reference. Eventually this will become the nucleus of a Table of Contents page which will be (optionally) part of every profile. (2) SAS formats catalog "formats.sas7bcat" which may save Windows users the few minutes it takes to run Proc Format once, but probably is not compatible with other platforms. --- rew/Aug 14 ------------------------------------------------------------------------------------- 9/16/2002 Update Announcement (read the above ReadMe first!) contents of SASProfileCodeSep13.zip Name Modified Size Ratio Packed MainSF3.sas 9/13/2002 4:45 PM 16,009 61% 6,275 PageTOC.sas 9/13/2002 4:23 PM 9,646 70% 2,870 Disprof.sas 9/11/2002 4:55 PM 68,103 81% 12,608 PrimeProf.sas 9/11/2002 4:53 PM 100,217 77% 22,703 subsets.sas 8/30/2002 6:09 PM 1,578 60% 628 Povprof.sas 8/30/2002 12:45 PM 89,007 80% 17,789 LangProf.sas 8/27/2002 4:58 PM 25,299 75% 6,221 formats.sas7bcat 8/22/2002 10:53 AM 431,104 82% 75,565 HousProf.sas 8/14/2002 2:48 PM 43,704 75% 10,901 sumlev.sas 8/13/2002 5:23 PM 5,151 78% 1,129 county.sas 8/13/2002 5:22 PM 107,322 74% 28,084 Geocomp.sas 8/13/2002 5:21 PM 9,368 88% 1,159 Geocompbrief.sas 8/13/2002 5:11 PM 5,525 81% 1,026 JobsProf.sas 8/12/2002 5:52 PM 25,985 81% 4,955 tranprof.sas 8/12/2002 12:55 PM 19,218 75% 4,872 EducProf.sas 8/ 6/2002 3:01 PM 13,355 75% 3,389 IncProf.sas 8/ 2/2002 6:03 PM 40,782 81% 7,874 AncyProf.sas 8/ 2/2002 5:26 PM 20,992 76% 4,950 familyprof.sas 7/25/2002 7:37 PM 9,840 77% 2,278 migrprof.sas 7/25/2002 7:30 PM 16,273 77% 3,724 secprof.sas 7/25/2002 6:30 PM 43,045 77% 9,720 SF3Template.sas 7/15/2002 3:49 PM 1,227 57% 529 CalcMedian.sas 4/ 5/2002 12:26 PM 3,722 59% 1,508 23 file(s) 1,106,472 79% 230,757 Major addition to the package: Profile set now (optionally) begins with a Table of Contents listing all the page titles and indicating which modules and pages were selected. Depending on the setting of the ToC parameter, the Table of Contents is included at the beginning of every profile, or only once at the beginnning of a run, or is suppressed entirely. Minor improvements and fixes: The %Include's in MainSF3 now have the correct upper & lower-case file names (relevant for UNIX users only.) Division by zero is now tested in DisProf; a space added to two table titles. Lines longer than 200 characters in DisProf were split by John Blodgett to avoid truncation warning messages. As far as we know this wasn't causing errors, but we don't want to ignore warning messages. (Thanks for fixing this, John.) Mean income deficit in PovProf now tested for division by zero (Thanks, Sen-Yuan Wu, NJ SDC) Typo in a comment fixed in PrimeProf. Line of asterisks with no semi-colon (unclosed comment) removed from the end of LangProf. Minor addition to the package: Tiny file "subsets.sas" illustrates chopping the huge data sets into faster- running extract files. MainSF3 now has these extract files (commented out) as alternatives to the MERGE of the big files. Additional user experiences: At least two users of the package discovered that in order to get appropriate page breaks they had to modify the final PUT statement (in the HeadFoot routine at the end of MainSF3) so that it creates 65 lines per page instead of 64. John Blodgett in MO, running under Unix, is using the extra line to report the profile's file name on his Web server, and Yi Zhao in WA, running under Windows, has moved the date and page number to the 65th line. John also discovered that ODS PDF works for him. In his environment he is able to bypass the step of distilling the PostScript output to pdf. Here at MISER the output from ODS PDF has spacing problems--the columns of numbers don't line up correctly. --- rew/Sept16