x cd /pub/data/bankdeps/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; %include '/pub/sas/autoexec.sas'; options mprint symbolgen mlogic; libname bankdeps '/pub/data/bankdeps'; /*<=========================Comment out===================================== * Run only once! ; options mprint; %doset(mode=initialize,libname=bankdeps,memname=mobrn00,debug=1) proc contents data=bankdeps.Datasets position; run; ===========================End commented out================================ */ /*<=========================Comment out===================================== %doset(memname=_template_mobrn,libname=bankdeps, memlabel=%nrbquote(~statenm Bank Branches and Deposits ~_year), geouniv=Missouri, units=Bank Branches, Years=~_year, CreatePgm=mobrnchs, Keywords=bank branch deposits county FDIC economic, Description=%nrbquote(These data are downloaded from the FDIC web site and contain data about each bank branch located in the state of Missouri. The branch name and street address are included along with the name of the county. We use a SAS format code to look up the county name and get the FIPS county code. These data are available annually and contain total deposit data as of the last day of June for the specified year. The URL for the FDIC website is https://www5.fdic.gov/sod/dynaDownload.asp?barItem=6.
Data are available there for all states and for multiple years, currently going back to 1994 and forward to last year.), keyvars=county cntyname bankname city zip , keyfmats=county, DataSource=Federal Deposit Insurance Corporation, SortedBy=cert, UsageNotes=%nrbquote(The 5-digit cert code and 8-digit docket code ID the bank. There does not seem to be a unique branch ID code. Docket is sometimes zero filled. The layout of the downloaded ascii files can be viewed at /data/bankdeps/readme.txt ), Means=,Mweights=, SubType=, SetGroup=~statenm, Sortprio=1, VarSet=, URLMeta=%str(https://www5.fdic.gov/sod/), filters=, debug=1) %let state=29; %let stab=MO; %let statenm=Missouri; %let _year=1997; %doset(memname=mobrn97,template=_template_mobrn,libname=bankdeps) %let _year=1999; %doset(memname=mobrn99,template=_template_mobrn,libname=bankdeps); %let _year=2000; %doset(memname=mobrn00,template=_template_mobrn,libname=bankdeps) %let _year=2003; %doset(memname=mobrn03,template=_template_mobrn,libname=bankdeps, CreatePgm=mobrnchs04, UsageNotes=%nrbquote(+
  • There was a very major change in the way the FDIC organized and presented their data starting with the 2003 files. They now provide a lot more data but we have just been trying to keep what we had been getting before. Note that we have the raw csv-file data for 2003 that can be accessed via uexplore. Similarly, the raw csv files for 2001 and 2002 are available in the old format.)) run; %doset(memname=_template_mocnty,libname=bankdeps, memlabel=%nrbquote(~statenm Bank Deposits by County ~_year), geouniv=Missouri, units=States Counties, Years=~_year, CreatePgm=modpsts, Keywords=bank deposits county aggregations FDIC economic ~_year, Description=%nrbquote(These datasets are created by aggregating the data in the corresponding branch deposits dataset, creating totals for the state and each county.), UsageNotes=%nrbquote(Deposits are in thousand of dollars and are not adjusted for inflation.
    Date is a SAS data variable that has been formatted to display as mmddyy but when downloaded to a CSV file will not be of any value. But it is a constant for each dataset with a formatted value of 0630(yy)
    The variable nbrnchs contains the number of branches summed to get the Deposits figure.), keyvars=slvl county , keyfmats=sumlev county, DataSource=Federal Deposit Insurance Corporation, SortedBy=slvl county, Means=,Mweights=, SubType=mocnty, SetGroup=~statenm, Sortprio=2, VarSet=, URLMeta=%str(http://www5.fdic.gov/sod/), filters=, debug=1); %let state=29; %let stab=MO; %let statenm=Missouri; %let _year=1990; %doset(memname=mocnty90,libname=bankdeps, template=_template_mocnty, createpgm=modpst90, Description=%nrbquote(The data for 1990 were extracted from the USA Counties file. That data was stored in the usaco96 filetype directory on the oseda archive. Variables used were ba01090 for nbrnchs and ba02090 for deposits.) ) %let _year=1997; %doset(memname=mocnty97,libname=bankdeps,CreatePgm=modpsts97, template=_template_mocnty,sortprio=2) %let _year=1999; %doset(memname=mocnty99,libname=bankdeps,CreatePgm=modpsts, template=_template_mocnty,sortprio=2) %let _year=2000; %doset(memname=mocnty00,libname=bankdeps,CreatePgm=modpsts, template=_template_mocnty,sortprio=2) %let _year=2003; %doset(memname=mocnty03,libname=bankdeps,CreatePgm=modpsts, UsageNotes=%nrbquote(), template=_template_mocnty,sortprio=2) %doset(memname=usinstitutions,libname=bankdeps, memlabel=%nrbquote(Complete US Directory of Banks as of June 30, 2003), geouniv=United States, units=Banks, Years=2003, CreatePgm=mobrnchs04, Keywords=bank directory county FDIC economic, Description=%nrbquote(These data are downloaded from the FDIC web site and contain data about each bank (institution) in the United States. ), keyvars=state county city zip , keyfmats=state county, DataSource=Federal Deposit Insurance Corporation, SortedBy=cert, UsageNotes=%nrbquote(The 5-digit cert code and 8-digit docket code ID the bank. Docket is sometimes zero filled.), Means=,Mweights=, SubType=, SetGroup=US, Sortprio=5, VarSet=, URLMeta=%str(http://www3.fdic.gov/sod), filters=, debug=1) %***??? *** include "/SAS_temp/bankdeps_invoke_dosets.sas"/source2; %let state=29; %let stab=MO; %let statenm=Missouri; %let _year=2004; %doset(memname=mocnty04,libname=bankdeps,CreatePgm=modpsts, UsageNotes=%nrbquote(), template=_template_mocnty,sortprio=2) %doset(memname=mobrn04,template=_template_mobrn,libname=bankdeps, CreatePgm=mobrnchs05, UsageNotes=%nrbquote() ); run; %let state=29; %let stab=MO; %let statenm=Missouri; %let _year=2005; %doset(memname=mocnty05,libname=bankdeps,CreatePgm=modpsts, UsageNotes=%nrbquote(), template=_template_mocnty,sortprio=2) %doset(memname=mobrn05,template=_template_mobrn,libname=bankdeps, CreatePgm=mobrnchs06, UsageNotes=%nrbquote() ); run; %let _year=2008; %let yr=%substr(&_year,3,2); %doset(memname=mocnty&yr,libname=bankdeps,CreatePgm=modpsts, UsageNotes=%nrbquote(), template=_template_mocnty,sortprio=2) %doset(memname=mobrn&yr,template=_template_mobrn,libname=bankdeps, CreatePgm=mobrnchs&yr ); run; %let _year = 2017; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); %*--CreatePgm was mobrnchs&yr thru 2012. Using mobrnchsxx starting with 2013 data--; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; ===========================End commented out================================ */ data bankdeps.mobrn18 (outrep='LINUX_X86_64'); set bankdeps.mobrn18; run; data bankdeps.mocnty18 (outrep='LINUX_X86_64'); set bankdeps.mocnty18; run; data bankdeps.mobrn19 (outrep='LINUX_X86_64'); set bankdeps.mobrn19; run; data bankdeps.mocnty19 (outrep='LINUX_X86_64'); set bankdeps.mocnty19; run; data bankdeps.mobrn20 (outrep='LINUX_X86_64'); set bankdeps.mobrn20; run; data bankdeps.mocnty20 (outrep='LINUX_X86_64'); set bankdeps.mocnty20; run; data bankdeps.mobrn21 (outrep='LINUX_X86_64'); set bankdeps.mobrn21; run; data bankdeps.mocnty21 (outrep='LINUX_X86_64'); set bankdeps.mocnty21; run; data bankdeps.mobrn22 (outrep='LINUX_X86_64'); set bankdeps.mobrn22; run; data bankdeps.mocnty22 (outrep='LINUX_X86_64'); set bankdeps.mocnty22; run; data bankdeps.mobrn23 (outrep='LINUX_X86_64'); set bankdeps.mobrn23; run; data bankdeps.mocnty23 (outrep='LINUX_X86_64'); set bankdeps.mocnty23; run; %let state = 29; %let stab = MO; %let statenm = Missouri; /* Templates go above others. */ %doset( memname=_template_mocnty, libname=bankdeps, memlabel=%nrbquote(~statenm Bank Deposits by County ~_year), geouniv=Missouri, units=States Counties, Years=~_year, CreatePgm=modpsts, Keywords=bank deposits county aggregations FDIC economic ~_year, Description=%nrbquote(

    These datasets are created by aggregating the data in the corresponding branch deposits dataset, creating totals for the state and each county. ), UsageNotes=%nrbquote(

    ), keyvars=slvl county , keyfmats=sumlev county, DataSource=Federal Deposit Insurance Corporation, SortedBy=slvl county, Means=,Mweights=, SubType=mocnty, SetGroup=~statenm, Sortprio=2, VarSet=, URLMeta=%str(http://www5.fdic.gov/sod/), filters=, debug=1 ); run; %doset( memname=_template_mobrn, libname=bankdeps, memlabel=%nrbquote(~statenm Bank Branches and Deposits ~_year), geouniv=Missouri, units=Bank Branches, Years=~_year, CreatePgm=mobrnchs, Keywords=bank branch deposits county FDIC economic, Description=%nrbquote(

    These data are downloaded from the FDIC web site and contain data about each bank branch located in the state of Missouri. The branch name and street address are included along with the name of the county. We use a SAS format code to look up the county name and get the FIPS county code. These data are available annually and contain total deposit data as of the last day of June for the specified fiscal year.

    Data are available there for all states and for multiple years, currently going back to 1994 and forward to last year.

    ), keyvars=county cntyname bankname city zip, keyfmats=county, DataSource=Federal Deposit Insurance Corporation, SortedBy=cert, UsageNotes=%nrbquote( ), Means=,Mweights=, SubType=, SetGroup=~statenm, Sortprio=1, VarSet=, URLMeta=%str(https://www5.fdic.gov/sod/), filters=, debug=1 ); run; %let _year = 2018; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; %let _year = 2019; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; %let _year = 2020; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; %let _year = 2021; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; %let _year = 2022; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; %let _year = 2023; %let yr = %substr(&_year, 3, 2); %doset( memname=mocnty&yr, libname=bankdeps, CreatePgm=modpsts, UsageNotes=%nrbquote( ), template=_template_mocnty, sortprio=2 ); run; %doset( memname=mobrn&yr, template=_template_mobrn, libname=bankdeps, CreatePgm=mobrnchsxx ); run; /* Following code goes at the end and is run every time. proc datasets library=bankdeps nolist; modify datasets; index delete dataset memname; index create dataset=(libname memname) / unique; index create memname; quit; proc sort force data=bankdeps.datasets nodupkey; by LatestYear descending setgroup memname; run; options mprint msglevel=i; */ %gendshtm(libname=bankdeps, debug=1, runprocc=1);