NOTE: PROCEDURE PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

3    
4    libname dsdata
4  ! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
4  ! AR\CodeAndData\00_DataCollection\dc_data";
NOTE: Libref DSDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
      AR\CodeAndData\00_DataCollection\dc_data
5    
6    data company;set dsdata.company20181001;run;

NOTE: There were 133870 observations read from the data set DSDATA.COMPANY20181001.
NOTE: The data set WORK.COMPANY has 133870 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           0.11 seconds
      cpu time            0.00 seconds
      

7    data facility;set dsdata.facility20181001; rename Company=Bowrrower; label Company="Borrower"
7  ! ; rename BorrowerCompanyID=BorrowerID; label BorrowerCompanyID="BorrowerID"; drop comment;
7  ! run;

NOTE: There were 353642 observations read from the data set DSDATA.FACILITY20181001.
NOTE: The data set WORK.FACILITY has 353642 observations and 23 variables.
NOTE: DATA statement used (Total process time):
      real time           0.68 seconds
      cpu time            0.12 seconds
      

8    data lender;set dsdata.lender20181001;rename CompanyID=LenderID; label CompanyID="LenderID";
8  ! run;

NOTE: There were 1925647 observations read from the data set DSDATA.LENDER20181001.
NOTE: The data set WORK.LENDER has 1925647 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           0.51 seconds
      cpu time            0.01 seconds
      

9    
10   
11   proc sort data = facility out=facility; by facilityid;run;

NOTE: There were 353642 observations read from the data set WORK.FACILITY.
NOTE: The data set WORK.FACILITY has 353642 observations and 23 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.22 seconds
      cpu time            0.01 seconds
      

12   
13   /*lender parent with info*/
14   
15   data lenderinfo;
16   set company;
17   LenderID=CompanyID;
18   LenderUltiParentID=UltimateParentID;
19   LenderPublicPrivate=PublicPrivate;
20   LenderTicker=Ticker;
21   LenderCity=City;
22   LenderState=State;
23   LenderCountry=Country;
24   LenderZipcode=Zipcode;
25   LenderType=InstitutionType;
26   LenderSIC=PrimarySICCode;
27   keep LenderID LenderUltiParentID LenderPublicPrivate LenderTicker LenderCity LenderState
27 ! LenderCountry LenderZipcode LenderType LenderSIC;
28   run;

NOTE: There were 133870 observations read from the data set WORK.COMPANY.
NOTE: The data set WORK.LENDERINFO has 133870 observations and 10 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds
      

29   
30   
31   proc sort data = lender; by lenderid;run;

NOTE: There were 1925647 observations read from the data set WORK.LENDER.
NOTE: The data set WORK.LENDER has 1925647 observations and 7 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.42 seconds
      cpu time            0.18 seconds
      

32   proc sort data = lenderinfo; by lenderid;run;

NOTE: There were 133870 observations read from the data set WORK.LENDERINFO.
NOTE: The data set WORK.LENDERINFO has 133870 observations and 10 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.06 seconds
      cpu time            0.03 seconds
      

33   data lender;merge lender (in=a) lenderinfo;by lenderid;if a;run;

NOTE: There were 1925647 observations read from the data set WORK.LENDER.
NOTE: There were 133870 observations read from the data set WORK.LENDERINFO.
NOTE: The data set WORK.LENDER has 1925647 observations and 16 variables.
NOTE: DATA statement used (Total process time):
      real time           0.76 seconds
      cpu time            0.36 seconds
      

34   
35   data lenderparent;set lender; LUProle=lenderrole;keep FacilityID LUProle BankAllocation
35 ! AgentCredit LeadArrangerCredit LenderUltiParentID; run;

NOTE: There were 1925647 observations read from the data set WORK.LENDER.
NOTE: The data set WORK.LENDERPARENT has 1925647 observations and 6 variables.
NOTE: DATA statement used (Total process time):
      real time           0.37 seconds
      cpu time            0.15 seconds
      

36   
37   data lenderparentinfo;
38   set company;
39   LenderUltiParentID=CompanyID;
40   LenderUltiParent=Company;
41   LUPPublicPrivate=PublicPrivate;
42   LUPTicker=Ticker;
43   LUPcity=city;
44   LUPstate=state;
45   LUPcountry=country;
46   LUPzipcode=zipcode;
47   LUPType=InstitutionType;
48   LUPSIC=PrimarySICCode;
49   keep LenderUltiParentID LenderUltiParent LUPPublicPrivate LUPTicker LUPcity LUPstate
49 ! LUPcountry LUPzipcode LUPType LUPSIC;
50   run;

NOTE: There were 133870 observations read from the data set WORK.COMPANY.
NOTE: The data set WORK.LENDERPARENTINFO has 133870 observations and 10 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds
      

51   
52   
53   proc sort data = lenderparent; by LenderUltiParentID;run;

NOTE: There were 1925647 observations read from the data set WORK.LENDERPARENT.
NOTE: The data set WORK.LENDERPARENT has 1925647 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.33 seconds
      cpu time            0.11 seconds
      

54   proc sort data = lenderparentinfo; by LenderUltiParentID;run;

NOTE: There were 133870 observations read from the data set WORK.LENDERPARENTINFO.
NOTE: The data set WORK.LENDERPARENTINFO has 133870 observations and 10 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.08 seconds
      cpu time            0.00 seconds
      

55   data lenderparent;merge lenderparent (in=a) lenderparentinfo;by LenderUltiParentID;if a;run;

NOTE: There were 1925647 observations read from the data set WORK.LENDERPARENT.
NOTE: There were 133870 observations read from the data set WORK.LENDERPARENTINFO.
NOTE: The data set WORK.LENDERPARENT has 1925647 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           0.80 seconds
      cpu time            0.04 seconds
      

56   
57   data lenderparent;set lenderparent; if LUPType='US Bank' or LUPType='Thrift / S&L' or
57 ! LUPType='Mortgage Bank' or LUPType='Investment Bank' or LenderUltiParentID=77486; if
57 ! LUPcountry='USA';run;

NOTE: There were 1925647 observations read from the data set WORK.LENDERPARENT.
NOTE: The data set WORK.LENDERPARENT has 499457 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           0.46 seconds
      cpu time            0.01 seconds
      

58   
59   
60   /*network lender parent with info*/
61   
62   data NWlenderparent;
63   set lenderparent;
64   NWLenderUltiParentID=LenderUltiParentID;
65   NWLenderUltiParent=LenderUltiParent;
66   NWLUPRole=LUProle;
67   NWBankAllocation=BankAllocation;
68   NWAgentCredit=AgentCredit;
69   NWLeadCredit=LeadArrangerCredit;
70   
71   NWLUPPublicPrivate=LUPPublicPrivate;
72   NWLUPTicker=LUPTicker;
73   NWLUPCity=LUPCity;
74   NWLUPState=LUPState;
75   NWLUPCountry=LUPCountry;
76   NWLUPZipcode=LUPZipcode;
77   NWLUPType=LUPType;
78   NWLUPSIC=LUPSIC;
79   
80   keep FacilityID NWLenderUltiParentID NWLenderUltiParent NWLUPRole NWBankAllocation
80 ! NWAgentCredit NWLeadCredit
81   NWLUPPublicPrivate NWLUPTicker NWLUPCity NWLUPState NWLUPCountry NWLUPZipcode NWLUPType
81 ! NWLUPSIC;
82   run;

NOTE: There were 499457 observations read from the data set WORK.LENDERPARENT.
NOTE: The data set WORK.NWLENDERPARENT has 499457 observations and 15 variables.
NOTE: DATA statement used (Total process time):
      real time           0.22 seconds
      cpu time            0.01 seconds
      

83   
84   
85   /*Build interbank network*/
86   
87   
88   proc sort data = NWlenderparent; by facilityid;run;

NOTE: There were 499457 observations read from the data set WORK.NWLENDERPARENT.
NOTE: The data set WORK.NWLENDERPARENT has 499457 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.31 seconds
      cpu time            0.06 seconds
      

89   proc sort data= lenderparent;by LenderUltiParentID facilityid;run;

NOTE: There were 499457 observations read from the data set WORK.LENDERPARENT.
NOTE: The data set WORK.LENDERPARENT has 499457 observations and 15 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.29 seconds
      cpu time            0.00 seconds
      

90   
91   
92   proc sql;
93     create table network(drop=tmpid) as
94     select  *
95     from lenderparent, NWlenderparent(rename=(FacilityID=tmpid))
96     where lenderparent.FacilityID=NWlenderparent.tmpid
97     order by LenderUltiParentID, FacilityID;
NOTE: Table WORK.NETWORK created, with 2592313 rows and 29 columns.

98   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           5.09 seconds
      cpu time            2.10 seconds
      

99   run;
100  
101  
102  
103  
104  proc sort data=network ;by facilityid;run;

NOTE: There were 2592313 observations read from the data set WORK.NETWORK.
NOTE: The data set WORK.NETWORK has 2592313 observations and 29 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           3.60 seconds
      cpu time            2.34 seconds
      

105  proc sort data=facility;by facilityid;run;

NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

106  
107  
108  data network ;
109  merge network (in=a) facility;
110  by facilityid;
111  if a;
112  run;

NOTE: There were 2592313 observations read from the data set WORK.NETWORK.
NOTE: There were 353642 observations read from the data set WORK.FACILITY.
NOTE: The data set WORK.NETWORK has 2592313 observations and 51 variables.
NOTE: DATA statement used (Total process time):
      real time           3.62 seconds
      cpu time            1.95 seconds
      

113  
114  data network;
115  set network;
116  y=year(FacilityStartDate);
117  q=qtr(FacilityStartDate);
118  if LenderUltiParentID ~=NWLenderUltiParentID ;
119  run;

NOTE: There were 2592313 observations read from the data set WORK.NETWORK.
NOTE: The data set WORK.NETWORK has 1974066 observations and 53 variables.
NOTE: DATA statement used (Total process time):
      real time           3.01 seconds
      cpu time            1.51 seconds
      

120  
121  
122  proc sort data=network ;by LenderUltiParentID y q borrowerid NWLenderUltiParentID;run;

NOTE: There were 1974066 observations read from the data set WORK.NETWORK.
NOTE: The data set WORK.NETWORK has 1974066 observations and 53 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           6.15 seconds
      cpu time            2.64 seconds
      

123  
124  data network; set network; by LenderUltiParentID y q borrowerid NWLenderUltiParentID; if
124! first. NWLenderUltiParentID;run;

NOTE: There were 1974066 observations read from the data set WORK.NETWORK.
NOTE: The data set WORK.NETWORK has 1031494 observations and 53 variables.
NOTE: DATA statement used (Total process time):
      real time           2.17 seconds
      cpu time            1.06 seconds
      

125  
126  proc sort data=network ;by LenderUltiParentID y q;run;

NOTE: There were 1031494 observations read from the data set WORK.NETWORK.
NOTE: The data set WORK.NETWORK has 1031494 observations and 53 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           2.86 seconds
      cpu time            1.53 seconds
      

127  
128  
129  libname dsdata
129! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
129! AR\CodeAndData\01_Build\bd_data";
NOTE: Libref DSDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
      AR\CodeAndData\01_Build\bd_data
130  data dsdata.network; set network;run;

NOTE: There were 1031494 observations read from the data set WORK.NETWORK.
NOTE: The data set DSDATA.NETWORK has 1031494 observations and 53 variables.
NOTE: DATA statement used (Total process time):
      real time           1.81 seconds
      cpu time            0.93 seconds
      

131  
132  
133  libname dsdata
133! "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
133! AR\CodeAndData\01_Build\bd_data";
NOTE: Libref DSDATA was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: 
      C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\J
      AR\CodeAndData\01_Build\bd_data
134  
135  data network;
136  set dsdata.network;
137  run;

NOTE: There were 1031494 observations read from the data set DSDATA.NETWORK.
NOTE: The data set WORK.NETWORK has 1031494 observations and 53 variables.
NOTE: DATA statement used (Total process time):
      real time           1.93 seconds
      cpu time            0.82 seconds
      

138  
139  data recentnetwork;
140  set dsdata.network;
141  count=1;
142  if y>2009;
143  run;

NOTE: There were 1031494 observations read from the data set DSDATA.NETWORK.
NOTE: The data set WORK.RECENTNETWORK has 420460 observations and 54 variables.
NOTE: DATA statement used (Total process time):
      real time           1.65 seconds
      cpu time            0.25 seconds
      

144  
145  proc means data=recentnetwork noprint;by LenderUltiParentID;var count;output out=nwnumber
145! sum=count;run;

NOTE: There were 420460 observations read from the data set WORK.RECENTNETWORK.
NOTE: The data set WORK.NWNUMBER has 618 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.17 seconds
      cpu time            0.15 seconds
      

146  proc sort data=nwnumber; by count;run;

NOTE: There were 618 observations read from the data set WORK.NWNUMBER.
NOTE: The data set WORK.NWNUMBER has 618 observations and 4 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

147  data nwnumber; set nwnumber; keep LenderUltiParentID count;run;

NOTE: There were 618 observations read from the data set WORK.NWNUMBER.
NOTE: The data set WORK.NWNUMBER has 618 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

148  
149  PROC EXPORT DATA=nwnumber
150              FILE="C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_li
150! quidity\Journal\JAR\CodeAndData\01_Build\bd_data\nwnumber"
151              DBMS=xlsx REPLACE;
152  RUN;

NOTE: The export data set has 618 observations and 2 variables.
NOTE: "C:\Users\yl2269\Dropbox\Yao_Backup\ChicagoBooth_DB\Research_Project\Bank_liquidity\Journal\
      JAR\CodeAndData\01_Build\bd_data\nwnumber.xlsx" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.05 seconds
      cpu time            0.04 seconds
      

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           1:12.10
      cpu time            17.09 seconds
      
