x cd /mscdc/ciesin; *<===; %let pgm=xtracts; *<===; filename pgm "&pgm..sas"; *<---linked to by stf903/Tools/xtracts.ciesin_archive.sas; *<---LIMITED ACCESS: must have read access to the rlink file, which currently means you must be in uic group on oseda-; filename rlink '/mscdc/ciesin/connect.scr'; *<---You can also extract data from these datasets using a WWW STF3A Extraction service currently under development at: CIESIN. The URL may change: try www.ciesin.org:2222/index.html. then select "Archive of Census Related Products".; *--download stf3 extract data from ciesin full stf3a archive--; *<==run to get complete South Dakota tract/BNA data 4-16-96; *--check for and edit all lines containing "<==="; %let a=cn2.ciesin.org; *--this address same as above--; %let a=160.39.8.22; options comamid=tcp remote=a nocaps msglevel=i; title "&pgm: Connect to CIESIN to Download Data"; ***libname mable '/mscdc/ciesin/mable/mable.sdl'; libname sasout "/mscdc/data/stf903";*<=====output dest==; *<---connect to Saginaw, MI site (CIESIN)--; signon a; rsubmit; *--these commands run on remote host machine--; %let ss=nd; *<==== specify state postal abbreviation; %let geo=tract; *<===specify geo-unit. See comment below; /* Possible geo values are: stcnty: state (slvl='040') and county('050') summaries (Multiple 040 obs due to geocomp summaries). mcds: minor civil divisions (County subdivsions) places: Census places (cities, towns, CDps) SLVLs 155 and 160. other: Assorted other, varies by state. Includes MSAs PMSAs (within state), Indian & Alsaska Native regions. tract: Census tract/BNA - SLVL 140. blkgrp: Block groups - SLVL 150. sl070, sl080, sl090: These correspond to SLVL (SUMLEV) value codes. 070 is MCD-Place, 080 is MCD-Place-Tract, 090 is MCD-Place-Tract--block group. These are referred to as "Hierarchal" levels. ----------*/ x cd /ciesin/projects/www/SEDAC/htmls; **x ls -l; libname library '/ciesin/projects/www/SEDAC/htmls/plue/ftparchive/sas'; %let jobpid=&ss&geo; *<===; %put jobpid= &jobpid; **let the fun begin!; x "rm &jobpid"; x "mknod &jobpid p"; x "ls -l &jobpid"; x "cd /ciesin/projects/www/SEDAC/htmls/plue/pro-anonftp/pub/census/usa"; x "ls -l stf/&ss/3xpt"; x "(unset noclobber; %let ssgeo=&ss&geo; unzip -cqq stf/&ss/3xpt/&ssgeo..zip > ~/&jobpid &)"; /* > /dev/null";*/ x "ls -l ~/&jobpid"; libname outpipe xport "~/&jobpid"; proc download status=no data=outpipe.&ssgeo out=sasout.&ss&geo; *<===add a keep= where= or drop= spec as part of data= spec to limit observations and/or variables to be retrieved; run; endrsubmit; signoff a; *<---disconnect from remote machine.-; *--we are back to the local machine. We take a look at what we downloaded. we have to repeat the defn of ssgeo for the local environment--; %let ss=nd; %let geo=tract;%*<===have to repeat in local env.--; %let ssgeo=&ss&geo; proc print data=sasout.&ssgeo(obs=40); var _character_ p1i1 intptlat intptlng areasqmi; *<====; title2 "Sample of sasout.&ssgeo"; run;