Hello,
I am working with the Execucomp database which contains annual compensation data for 74,300 of the top five executives of over 3,300 companies. After dropping all executives besides CEOs, the new number of observations is 13,678.
Additionally, I am using stock returns from Center for Research in Security Prices (CRSP) to complement the compensation data discussed above. The original dataset contained 677,216 observations.
Anyway, after using the monthly return data in the CRSP dataset, I made a annual_return variable to so that I could look at firm performance on a yearly basis (to match with CEO salaries).
After some data cleaning, the number of observations in the merged ceo_firm dataset is only 1,394. This doesn't sound right to me. Can you help me find where the data may have gone or what I need to change?
Here is my program:
libname paper "~/425/425_Final_Paper"; *import compustat dataset; PROC IMPORT out=paper.CompuStat_Execucomp datafile="~/425/425_Final_Paper/CompuStat_Execucomp.csv" DBMS=CSV replace; getnames= yes; guessingrows=2000; run; *keep only CEOs; data paper.Compustat_ExecuComp2; set paper.Compustat_ExecuComp; if CEOANN = 'CEO'; run; *** extra DATA step for checking previous data step results by comparing number of records selected; data check_CEOANN; set paper.Compustat_ExecuComp; if CEOANN =: 'CEO'; run; proc sort data=paper.Compustat_ExecuComp2; by ticker year; run; *import csrp dataset; PROC IMPORT out=paper.CSRP_Monthly_Stock_char datafile="~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv" DBMS=CSV replace; getnames= yes; guessingrows=max; run; *remove bad data; data paper.CSRP_Monthly_Stock_char2; set paper.CSRP_Monthly_Stock_char; if cusip = ' ' then delete; if ret = . then delete; year = int( date/10000 ); month = month(date); if cusip =: '?' then cusip = substr(cusip, 2); run; proc sort data=paper.CSRP_Monthly_Stock_char2; by ticker year; run; *find additional bad data: tickers with 2 CEO records for the same year; proc freq data=paper.Compustat_ExecuComp2; tables ticker * year / noprint out=paper.multiple_ceos (where=(count > 1)); run; *Remove all bad years from both data sources; data paper.Compustat_ExecuComp3; merge paper.Compustat_ExecuComp2 paper.multiple_CEOs (keep=ticker year in=had_multiple_CEOs); by ticker year; if had_multiple_CEOs then delete; run; data paper.CSRP_Monthly_Stock_char3; merge paper.CSRP_Monthly_Stock_char2 paper.multiple_CEOs (keep=ticker year in=had_multiple_CEOs); by ticker year; if had_multiple_CEOs then delete; run; *find additional bad data: multiple return records for the same month/year; proc freq data=paper.CSRP_Monthly_Stock_char3; tables ticker * year * month / noprint out=paper.multiple_returns; run; *Remove all matching year data for multiple returns; proc sort data=paper.multiple_returns out=multiple_returns (keep=ticker year) NODUPKEY; by ticker year; run; data paper.Compustat_ExecuComp4; merge paper.Compustat_ExecuComp3 multiple_returns (in=had_multiple_returns); by ticker year; if had_multiple_returns then delete; run; data paper.CSRP_Monthly_Stock_char4; merge paper.CSRP_Monthly_Stock_char3 multiple_returns (in=had_multiple_returns); by ticker year; if had_multiple_returns then delete; run; *create new variable annualized growth; data paper.CSRP_annual_returns; set paper.CSRP_Monthly_Stock_char4; by ticker year; retain annual_return 1; annual_return = annual_return * (1 + RET); if month = 12 or last.ticker; annual_return = (annual_return - 1) * 100; output; annual_return = 1; keep ticker year annual_return; run; *use proc contents to see if there is a type mismatch; proc contents data=paper.annual_returns; run; proc contents data=paper.Compustat_ExecuComp4; run; *Merge CEO data and firm data by year. Use CUSIP from CEO data; DATA paper.ceo_firm ; length ticker $5; MERGE paper.CSRP_annual_returns paper.compustat_execucomp4; BY ticker; RUN; proc contents data=paper.ceo_firm; run; *remove missing return data; data paper.ceo_firm; set paper.ceo_firm; if annual_return = . then delete; run;
And here is the log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 70 71 libname paper "~/425/425_Final_Paper"; NOTE: Libref PAPER was successfully assigned as follows: Engine: V9 Physical Name: /home/apmorabito0/425/425_Final_Paper 72 73 *import compustat dataset; 74 PROC IMPORT out=paper.CompuStat_Execucomp 75 datafile="~/425/425_Final_Paper/CompuStat_Execucomp.csv" 76 DBMS=CSV replace; 77 getnames= yes; 78 guessingrows=2000; 79 run; NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to WORK.PARMS.PARMS.SLIST. 80 /********************************************************************** 81 * PRODUCT: SAS 82 * VERSION: 9.4 83 * CREATOR: External File Interface 84 * DATE: 27MAR18 85 * DESC: Generated SAS Datastep Code 86 * TEMPLATE SOURCE: (None Specified.) 87 ***********************************************************************/ 88 data PAPER.COMPUSTAT_EXECUCOMP ; 89 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ 90 infile '~/425/425_Final_Paper/CompuStat_Execucomp.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ; 91 informat EXEC_FULLNAME $614. ; 92 informat CFOANN $7. ; 93 informat EXECDIR $2. ; 94 informat OLD_DATAFMT_FLAG $4. ; 95 informat INTERLOCK $3. ; 96 informat REPRICE best32. ; 97 informat EXECRANK $8. ; 98 informat CO_PER_ROL $5. ; 99 informat CONAME $34. ; 100 informat TITLEANN $246. ; 101 informat CEOANN $3. ; 102 informat SALARY best32. ; 103 informat BONUS $12. ; 104 informat STOCK_AWARDS $30. ; 105 informat OPTION_AWARDS $52. ; 106 informat NONEQ_INCENT $37. ; 107 informat PENSION_CHG $9. ; 108 informat OTHCOMP $9. ; 109 informat TOTAL_SEC best32. ; 110 informat TOTAL_CURR best32. ; 111 informat TOTAL_ALT1 best32. ; 112 informat TOTAL_ALT2 best32. ; 113 informat TERM_PYMT best32. ; 114 informat CHG_CTRL_PYMT best32. ; 115 informat SHROWN_TOT best32. ; 116 informat SHROWN_TOT_PCT best32. ; 117 informat SHROWN_EXCL_OPTS best32. ; 118 informat SHROWN_EXCL_OPTS_PCT best32. ; 119 informat OPT_EXER_NUM best32. ; 120 informat OPT_EXER_VAL best32. ; 121 informat SHRS_VEST_NUM best32. ; 122 informat SHRS_VEST_VAL best32. ; 123 informat AGE best32. ; 124 informat OPTION_AWARDS_NUM best32. ; 125 informat OPTION_AWARDS_FV best32. ; 126 informat STOCK_AWARDS_FV best32. ; 127 informat OPT_UNEX_EXER_NUM best32. ; 128 informat OPT_UNEX_UNEXER_NUM best32. ; 129 informat OPT_UNEX_EXER_EST_VAL best32. ; 130 informat OPT_UNEX_UNEXER_EST_VAL best32. ; 131 informat STOCK_UNVEST_NUM best32. ; 132 informat STOCK_UNVEST_VAL best32. ; 133 informat EIP_UNEARN_NUM best32. ; 134 informat EIP_UNEARN_VAL best32. ; 135 informat PENSION_VALUE_TOT best32. ; 136 informat PENSION_PYMTS_TOT best32. ; 137 informat DEFER_CONTRIB_EXEC_TOT best32. ; 138 informat DEFER_CONTRIB_CO_TOT best32. ; 139 informat DEFER_EARNINGS_TOT best32. ; 140 informat DEFER_WITHDR_TOT best32. ; 141 informat DEFER_BALANCE_TOT best32. ; 142 informat DEFER_RPT_AS_COMP_TOT best32. ; 143 informat EXECRANKANN best32. ; 144 informat OTHANN $1. ; 145 informat TDC1 best32. ; 146 informat TDC2 best32. ; 147 informat RSTKGRNT $1. ; 148 informat OPTION_AWARDS_BLK_VALUE $1. ; 149 informat OPTION_AWARDS_RPT_VALUE $1. ; 150 informat LTIP $1. ; 151 informat ALLOTHTOT $1. ; 152 informat ALLOTHPD $1. ; 153 informat SAL_PCT best32. ; 154 informat TOTAL_CURR_PCT best32. ; 155 informat TOTAL_SEC_PCT best32. ; 156 informat TOTAL_ALT1_PCT best32. ; 157 informat TOTAL_ALT2_PCT best32. ; 158 informat TDC1_PCT best32. ; 159 informat TDC2_PCT best32. ; 160 informat RET_YRS $1. ; 161 informat COMMENT $1. ; 162 informat GVKEY best32. ; 163 informat EXECID best32. ; 164 informat YEAR best32. ; 165 informat RSTKVYRS $1. ; 166 informat BECAMECEO best32. ; 167 informat JOINED_CO best32. ; 168 informat REJOIN $1. ; 169 informat LEFTOFC best32. ; 170 informat LEFTCO best32. ; 171 informat RELEFT $1. ; 172 informat PCEO $3. ; 173 informat PCFO $3. ; 174 informat TITLE $215. ; 175 informat REASON $7. ; 176 informat EXEC_LNAME $22. ; 177 informat EXEC_FNAME $12. ; 178 informat EXEC_MNAME $9. ; 179 informat GENDER $6. ; 180 informat NAMEPREFIX $3. ; 181 informat PAGE best32. ; 182 informat CUSIP $8. ; 183 informat EXCHANGE $3. ; 184 informat ADDRESS $41. ; 185 informat CITY $15. ; 186 informat STATE $2. ; 187 informat ZIP $5. ; 188 informat TELE $14. ; 189 informat SICDESC $30. ; 190 informat NAICSDESC $52. ; 191 informat INDDESC $44. ; 192 informat SPCODE $2. ; 193 informat TICKER $5. ; 194 informat SUB_TELE best32. ; 195 informat NAICS best32. ; 196 informat SPINDEX best32. ; 197 informat SIC best32. ; 198 format EXEC_FULLNAME $614. ; 199 format CFOANN $7. ; 200 format EXECDIR $2. ; 201 format OLD_DATAFMT_FLAG $4. ; 202 format INTERLOCK $3. ; 203 format REPRICE best12. ; 204 format EXECRANK $8. ; 205 format CO_PER_ROL $5. ; 206 format CONAME $34. ; 207 format TITLEANN $246. ; 208 format CEOANN $3. ; 209 format SALARY best12. ; 210 format BONUS $12. ; 211 format STOCK_AWARDS $30. ; 212 format OPTION_AWARDS $52. ; 213 format NONEQ_INCENT $37. ; 214 format PENSION_CHG $9. ; 215 format OTHCOMP $9. ; 216 format TOTAL_SEC best12. ; 217 format TOTAL_CURR best12. ; 218 format TOTAL_ALT1 best12. ; 219 format TOTAL_ALT2 best12. ; 220 format TERM_PYMT best12. ; 221 format CHG_CTRL_PYMT best12. ; 222 format SHROWN_TOT best12. ; 223 format SHROWN_TOT_PCT best12. ; 224 format SHROWN_EXCL_OPTS best12. ; 225 format SHROWN_EXCL_OPTS_PCT best12. ; 226 format OPT_EXER_NUM best12. ; 227 format OPT_EXER_VAL best12. ; 228 format SHRS_VEST_NUM best12. ; 229 format SHRS_VEST_VAL best12. ; 230 format AGE best12. ; 231 format OPTION_AWARDS_NUM best12. ; 232 format OPTION_AWARDS_FV best12. ; 233 format STOCK_AWARDS_FV best12. ; 234 format OPT_UNEX_EXER_NUM best12. ; 235 format OPT_UNEX_UNEXER_NUM best12. ; 236 format OPT_UNEX_EXER_EST_VAL best12. ; 237 format OPT_UNEX_UNEXER_EST_VAL best12. ; 238 format STOCK_UNVEST_NUM best12. ; 239 format STOCK_UNVEST_VAL best12. ; 240 format EIP_UNEARN_NUM best12. ; 241 format EIP_UNEARN_VAL best12. ; 242 format PENSION_VALUE_TOT best12. ; 243 format PENSION_PYMTS_TOT best12. ; 244 format DEFER_CONTRIB_EXEC_TOT best12. ; 245 format DEFER_CONTRIB_CO_TOT best12. ; 246 format DEFER_EARNINGS_TOT best12. ; 247 format DEFER_WITHDR_TOT best12. ; 248 format DEFER_BALANCE_TOT best12. ; 249 format DEFER_RPT_AS_COMP_TOT best12. ; 250 format EXECRANKANN best12. ; 251 format OTHANN $1. ; 252 format TDC1 best12. ; 253 format TDC2 best12. ; 254 format RSTKGRNT $1. ; 255 format OPTION_AWARDS_BLK_VALUE $1. ; 256 format OPTION_AWARDS_RPT_VALUE $1. ; 257 format LTIP $1. ; 258 format ALLOTHTOT $1. ; 259 format ALLOTHPD $1. ; 260 format SAL_PCT best12. ; 261 format TOTAL_CURR_PCT best12. ; 262 format TOTAL_SEC_PCT best12. ; 263 format TOTAL_ALT1_PCT best12. ; 264 format TOTAL_ALT2_PCT best12. ; 265 format TDC1_PCT best12. ; 266 format TDC2_PCT best12. ; 267 format RET_YRS $1. ; 268 format COMMENT $1. ; 269 format GVKEY best12. ; 270 format EXECID best12. ; 271 format YEAR best12. ; 272 format RSTKVYRS $1. ; 273 format BECAMECEO best12. ; 274 format JOINED_CO best12. ; 275 format REJOIN $1. ; 276 format LEFTOFC best12. ; 277 format LEFTCO best12. ; 278 format RELEFT $1. ; 279 format PCEO $3. ; 280 format PCFO $3. ; 281 format TITLE $215. ; 282 format REASON $7. ; 283 format EXEC_LNAME $22. ; 284 format EXEC_FNAME $12. ; 285 format EXEC_MNAME $9. ; 286 format GENDER $6. ; 287 format NAMEPREFIX $3. ; 288 format PAGE best12. ; 289 format CUSIP $8. ; 290 format EXCHANGE $3. ; 291 format ADDRESS $41. ; 292 format CITY $15. ; 293 format STATE $2. ; 294 format ZIP $5. ; 295 format TELE $14. ; 296 format SICDESC $30. ; 297 format NAICSDESC $52. ; 298 format INDDESC $44. ; 299 format SPCODE $2. ; 300 format TICKER $5. ; 301 format SUB_TELE best12. ; 302 format NAICS best12. ; 303 format SPINDEX best12. ; 304 format SIC best12. ; 305 input 306 EXEC_FULLNAME $ 307 CFOANN $ 308 EXECDIR $ 309 OLD_DATAFMT_FLAG $ 310 INTERLOCK $ 311 REPRICE 312 EXECRANK $ 313 CO_PER_ROL $ 314 CONAME $ 315 TITLEANN $ 316 CEOANN $ 317 SALARY 318 BONUS $ 319 STOCK_AWARDS $ 320 OPTION_AWARDS $ 321 NONEQ_INCENT $ 322 PENSION_CHG $ 323 OTHCOMP $ 324 TOTAL_SEC 325 TOTAL_CURR 326 TOTAL_ALT1 327 TOTAL_ALT2 328 TERM_PYMT 329 CHG_CTRL_PYMT 330 SHROWN_TOT 331 SHROWN_TOT_PCT 332 SHROWN_EXCL_OPTS 333 SHROWN_EXCL_OPTS_PCT 334 OPT_EXER_NUM 335 OPT_EXER_VAL 336 SHRS_VEST_NUM 337 SHRS_VEST_VAL 338 AGE 339 OPTION_AWARDS_NUM 340 OPTION_AWARDS_FV 341 STOCK_AWARDS_FV 342 OPT_UNEX_EXER_NUM 343 OPT_UNEX_UNEXER_NUM 344 OPT_UNEX_EXER_EST_VAL 345 OPT_UNEX_UNEXER_EST_VAL 346 STOCK_UNVEST_NUM 347 STOCK_UNVEST_VAL 348 EIP_UNEARN_NUM 349 EIP_UNEARN_VAL 350 PENSION_VALUE_TOT 351 PENSION_PYMTS_TOT 352 DEFER_CONTRIB_EXEC_TOT 353 DEFER_CONTRIB_CO_TOT 354 DEFER_EARNINGS_TOT 355 DEFER_WITHDR_TOT 356 DEFER_BALANCE_TOT 357 DEFER_RPT_AS_COMP_TOT 358 EXECRANKANN 359 OTHANN $ 360 TDC1 361 TDC2 362 RSTKGRNT $ 363 OPTION_AWARDS_BLK_VALUE $ 364 OPTION_AWARDS_RPT_VALUE $ 365 LTIP $ 366 ALLOTHTOT $ 367 ALLOTHPD $ 368 SAL_PCT 369 TOTAL_CURR_PCT 370 TOTAL_SEC_PCT 371 TOTAL_ALT1_PCT 372 TOTAL_ALT2_PCT 373 TDC1_PCT 374 TDC2_PCT 375 RET_YRS $ 376 COMMENT $ 377 GVKEY 378 EXECID 379 YEAR 380 RSTKVYRS $ 381 BECAMECEO 382 JOINED_CO 383 REJOIN $ 384 LEFTOFC 385 LEFTCO 386 RELEFT $ 387 PCEO $ 388 PCFO $ 389 TITLE $ 390 REASON $ 391 EXEC_LNAME $ 392 EXEC_FNAME $ 393 EXEC_MNAME $ 394 GENDER $ 395 NAMEPREFIX $ 396 PAGE 397 CUSIP $ 398 EXCHANGE $ 399 ADDRESS $ 400 CITY $ 401 STATE $ 402 ZIP $ 403 TELE $ 404 SICDESC $ 405 NAICSDESC $ 406 INDDESC $ 407 SPCODE $ 408 TICKER $ 409 SUB_TELE 410 NAICS 411 SPINDEX 412 SIC 413 ; 414 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ 415 run; NOTE: The infile '~/425/425_Final_Paper/CompuStat_Execucomp.csv' is: Filename=/home/apmorabito0/425/425_Final_Paper/CompuStat_Execucomp.csv, Owner Name=apmorabito0,Group Name=oda, Access Permission=-rw-r--r--, Last Modified=03Mar2018:03:40:25, File Size (bytes)=50937550 NOTE: 74300 records were read from the infile '~/425/425_Final_Paper/CompuStat_Execucomp.csv'. The minimum record length was 299. The maximum record length was 1177. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP has 74300 observations and 107 variables. NOTE: DATA statement used (Total process time): real time 1.12 seconds user cpu time 0.59 seconds system cpu time 0.14 seconds memory 15001.71k OS Memory 46632.00k Timestamp 03/27/2018 06:53:28 PM Step Count 82 Switch Count 1 Page Faults 0 Page Reclaims 315 Page Swaps 0 Voluntary Context Switches 4960 Involuntary Context Switches 7 Block Input Operations 0 Block Output Operations 302088 74300 rows created in PAPER.COMPUSTAT_EXECUCOMP from ~/425/425_Final_Paper/CompuStat_Execucomp.csv. NOTE: PAPER.COMPUSTAT_EXECUCOMP data set was successfully created. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP has 74300 observations and 107 variables. NOTE: PROCEDURE IMPORT used (Total process time): real time 6.09 seconds user cpu time 5.52 seconds system cpu time 0.18 seconds memory 15001.71k OS Memory 47404.00k Timestamp 03/27/2018 06:53:28 PM Step Count 82 Switch Count 7 Page Faults 0 Page Reclaims 6732 Page Swaps 0 Voluntary Context Switches 5034 Involuntary Context Switches 11 Block Input Operations 288 Block Output Operations 302152 416 417 *keep only CEOs; 418 data paper.Compustat_ExecuComp2; 419 set paper.Compustat_ExecuComp; 420 if CEOANN = 'CEO'; 421 run; NOTE: There were 74300 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP2 has 13678 observations and 107 variables. NOTE: DATA statement used (Total process time): real time 0.30 seconds user cpu time 0.07 seconds system cpu time 0.06 seconds memory 3630.43k OS Memory 38324.00k Timestamp 03/27/2018 06:53:28 PM Step Count 83 Switch Count 1 Page Faults 0 Page Reclaims 508 Page Swaps 0 Voluntary Context Switches 3425 Involuntary Context Switches 2 Block Input Operations 301824 Block Output Operations 55824 422 423 *** extra DATA step for checking previous data step results by comparing number of records selected; 424 data check_CEOANN; 425 set paper.Compustat_ExecuComp; 426 if CEOANN =: 'CEO'; 427 run; NOTE: There were 74300 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP. NOTE: The data set WORK.CHECK_CEOANN has 13678 observations and 107 variables. NOTE: DATA statement used (Total process time): real time 0.07 seconds user cpu time 0.02 seconds system cpu time 0.07 seconds memory 3630.50k OS Memory 38324.00k Timestamp 03/27/2018 06:53:28 PM Step Count 84 Switch Count 1 Page Faults 0 Page Reclaims 499 Page Swaps 0 Voluntary Context Switches 10 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 55816 428 429 proc sort data=paper.Compustat_ExecuComp2; 430 by ticker year; 431 run; NOTE: There were 13678 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP2. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP2 has 13678 observations and 107 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.15 seconds user cpu time 0.03 seconds system cpu time 0.05 seconds memory 31300.40k OS Memory 65580.00k Timestamp 03/27/2018 06:53:28 PM Step Count 85 Switch Count 1 Page Faults 0 Page Reclaims 7358 Page Swaps 0 Voluntary Context Switches 1221 Involuntary Context Switches 1 Block Input Operations 55840 Block Output Operations 55816 432 433 *import csrp dataset; 434 PROC IMPORT out=paper.CSRP_Monthly_Stock_char 435 datafile="~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv" 436 DBMS=CSV replace; 437 getnames= yes; 438 guessingrows=max; 439 run; NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to WORK.PARMS.PARMS.SLIST. 440 /********************************************************************** 441 * PRODUCT: SAS 442 * VERSION: 9.4 443 * CREATOR: External File Interface 444 * DATE: 27MAR18 445 * DESC: Generated SAS Datastep Code 446 * TEMPLATE SOURCE: (None Specified.) 447 ***********************************************************************/ 448 data PAPER.CSRP_MONTHLY_STOCK_CHAR ; 449 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ 450 infile '~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ; 451 informat PERMNO best32. ; 452 informat date best32. ; 453 informat NAMEENDT best32. ; 454 informat SHRCD best32. ; 455 informat EXCHCD best32. ; 456 informat SICCD $4. ; 457 informat NCUSIP $8. ; 458 informat TICKER $5. ; 459 informat COMNAM $32. ; 460 informat SHRCLS $1. ; 461 informat TSYMBOL $5. ; 462 informat NAICS best32. ; 463 informat PRIMEXCH $1. ; 464 informat TRDSTAT $1. ; 465 informat SECSTAT $1. ; 466 informat PERMCO best32. ; 467 informat ISSUNO best32. ; 468 informat HEXCD best32. ; 469 informat HSICCD $4. ; 470 informat CUSIP $9. ; 471 informat DCLRDT best32. ; 472 informat DLAMT best32. ; 473 informat DLPDT best32. ; 474 informat DLSTCD best32. ; 475 informat NEXTDT best32. ; 476 informat PAYDT best32. ; 477 informat RCRDDT best32. ; 478 informat SHRFLG best32. ; 479 informat HSICMG best32. ; 480 informat HSICIG best32. ; 481 informat DISTCD best32. ; 482 informat DIVAMT best32. ; 483 informat FACPR best32. ; 484 informat FACSHR best32. ; 485 informat ACPERM best32. ; 486 informat ACCOMP best32. ; 487 informat SHRENDDT best32. ; 488 informat NWPERM best32. ; 489 informat DLRETX $9. ; 490 informat DLPRC best32. ; 491 informat DLRET $9. ; 492 informat TRTSCD best32. ; 493 informat NMSIND best32. ; 494 informat MMCNT best32. ; 495 informat NSDINX best32. ; 496 informat BIDLO best32. ; 497 informat ASKHI best32. ; 498 informat PRC best32. ; 499 informat VOL best32. ; 500 informat RET $9. ; 501 informat BID best32. ; 502 informat ASK best32. ; 503 informat SHROUT best32. ; 504 informat CFACPR best32. ; 505 informat CFACSHR best32. ; 506 informat ALTPRC best32. ; 507 informat SPREAD best32. ; 508 informat ALTPRCDT best32. ; 509 informat RETX $9. ; 510 informat vwretd best32. ; 511 informat vwretx best32. ; 512 informat ewretd best32. ; 513 informat ewretx best32. ; 514 informat sprtrn best32. ; 515 format PERMNO best12. ; 516 format date best12. ; 517 format NAMEENDT best12. ; 518 format SHRCD best12. ; 519 format EXCHCD best12. ; 520 format SICCD $4. ; 521 format NCUSIP $8. ; 522 format TICKER $5. ; 523 format COMNAM $32. ; 524 format SHRCLS $1. ; 525 format TSYMBOL $5. ; 526 format NAICS best12. ; 527 format PRIMEXCH $1. ; 528 format TRDSTAT $1. ; 529 format SECSTAT $1. ; 530 format PERMCO best12. ; 531 format ISSUNO best12. ; 532 format HEXCD best12. ; 533 format HSICCD $4. ; 534 format CUSIP $9. ; 535 format DCLRDT best12. ; 536 format DLAMT best12. ; 537 format DLPDT best12. ; 538 format DLSTCD best12. ; 539 format NEXTDT best12. ; 540 format PAYDT best12. ; 541 format RCRDDT best12. ; 542 format SHRFLG best12. ; 543 format HSICMG best12. ; 544 format HSICIG best12. ; 545 format DISTCD best12. ; 546 format DIVAMT best12. ; 547 format FACPR best12. ; 548 format FACSHR best12. ; 549 format ACPERM best12. ; 550 format ACCOMP best12. ; 551 format SHRENDDT best12. ; 552 format NWPERM best12. ; 553 format DLRETX $9. ; 554 format DLPRC best12. ; 555 format DLRET $9. ; 556 format TRTSCD best12. ; 557 format NMSIND best12. ; 558 format MMCNT best12. ; 559 format NSDINX best12. ; 560 format BIDLO best12. ; 561 format ASKHI best12. ; 562 format PRC best12. ; 563 format VOL best12. ; 564 format RET $9. ; 565 format BID best12. ; 566 format ASK best12. ; 567 format SHROUT best12. ; 568 format CFACPR best12. ; 569 format CFACSHR best12. ; 570 format ALTPRC best12. ; 571 format SPREAD best12. ; 572 format ALTPRCDT best12. ; 573 format RETX $9. ; 574 format vwretd best12. ; 575 format vwretx best12. ; 576 format ewretd best12. ; 577 format ewretx best12. ; 578 format sprtrn best12. ; 579 input 580 PERMNO 581 date 582 NAMEENDT 583 SHRCD 584 EXCHCD 585 SICCD $ 586 NCUSIP $ 587 TICKER $ 588 COMNAM $ 589 SHRCLS $ 590 TSYMBOL $ 591 NAICS 592 PRIMEXCH $ 593 TRDSTAT $ 594 SECSTAT $ 595 PERMCO 596 ISSUNO 597 HEXCD 598 HSICCD $ 599 CUSIP $ 600 DCLRDT 601 DLAMT 602 DLPDT 603 DLSTCD 604 NEXTDT 605 PAYDT 606 RCRDDT 607 SHRFLG 608 HSICMG 609 HSICIG 610 DISTCD 611 DIVAMT 612 FACPR 613 FACSHR 614 ACPERM 615 ACCOMP 616 SHRENDDT 617 NWPERM 618 DLRETX $ 619 DLPRC 620 DLRET $ 621 TRTSCD 622 NMSIND 623 MMCNT 624 NSDINX 625 BIDLO 626 ASKHI 627 PRC 628 VOL 629 RET $ 630 BID 631 ASK 632 SHROUT 633 CFACPR 634 CFACSHR 635 ALTPRC 636 SPREAD 637 ALTPRCDT 638 RETX $ 639 vwretd 640 vwretx 641 ewretd 642 ewretx 643 sprtrn 644 ; 645 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ 646 run; NOTE: The infile '~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv' is: Filename=/home/apmorabito0/425/425_Final_Paper/CSRP_MonthlyStock_char.csv, Owner Name=apmorabito0,Group Name=oda, Access Permission=-rw-r--r--, Last Modified=20Mar2018:13:42:27, File Size (bytes)=185718029 NOTE: 677216 records were read from the infile '~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv'. The minimum record length was 140. The maximum record length was 354. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR has 677216 observations and 64 variables. NOTE: DATA statement used (Total process time): real time 5.18 seconds user cpu time 2.53 seconds system cpu time 0.28 seconds memory 14793.71k OS Memory 46408.00k Timestamp 03/27/2018 07:06:56 PM Step Count 86 Switch Count 1 Page Faults 0 Page Reclaims 277 Page Swaps 0 Voluntary Context Switches 11448 Involuntary Context Switches 16 Block Input Operations 0 Block Output Operations 669448 677216 rows created in PAPER.CSRP_MONTHLY_STOCK_CHAR from ~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv. NOTE: PAPER.CSRP_MONTHLY_STOCK_CHAR data set was successfully created. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR has 677216 observations and 64 variables. NOTE: PROCEDURE IMPORT used (Total process time): real time 13:28.11 user cpu time 13:23.77 system cpu time 1.92 seconds memory 14793.71k OS Memory 47180.00k Timestamp 03/27/2018 07:06:57 PM Step Count 86 Switch Count 8 Page Faults 0 Page Reclaims 93428 Page Swaps 0 Voluntary Context Switches 11568 Involuntary Context Switches 891 Block Input Operations 288 Block Output Operations 669528 647 648 *remove bad data; 649 data paper.CSRP_Monthly_Stock_char2; 650 set paper.CSRP_Monthly_Stock_char; 651 if cusip = ' ' then delete; 652 if ret = . then delete; 653 year = int( date/10000 ); 654 month = month(date); 655 if cusip =: '?' then cusip = substr(cusip, 2); 656 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 652:4 NOTE: Invalid argument to function MONTH(20100129) at line 654 column 9. PERMNO=10001 date=20100129 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20091216 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100129 RCRDDT=20100115 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100225 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.86 ASKHI=10.5 PRC=10.06 VOL=3104 RET=-0.018932 BID=10.06 ASK=10.15 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.06 SPREAD=. ALTPRCDT=20100129 RETX=-0.023301 vwretd=-0.037096 vwretx=-0.038109 ewretd=-0.011388 ewretx=-0.012292 sprtrn=-0.036974 year=2010 month=. _ERROR_=1 _N_=1 NOTE: Invalid argument to function MONTH(20100226) at line 654 column 9. PERMNO=10001 date=20100226 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100128 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100226 RCRDDT=20100215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100330 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.92 ASKHI=10.2201 PRC=10.0084 VOL=1510 RET=-0.000656 BID=10 ASK=10.04 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.0084 SPREAD=. ALTPRCDT=20100226 RETX=-0.005129 vwretd=0.034774 vwretx=0.032688 ewretd=0.033603 ewretx=0.032232 sprtrn=0.028514 year=2010 month=. _ERROR_=1 _N_=2 NOTE: Invalid argument to function MONTH(20100331) at line 654 column 9. PERMNO=10001 date=20100331 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100302 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100331 RCRDDT=20100315 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100429 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.91 ASKHI=10.18 PRC=10.17 VOL=2283 RET=0.020643 BID=10.17 ASK=10.23 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.17 SPREAD=. ALTPRCDT=20100331 RETX=0.016146 vwretd=0.063606 vwretx=0.06192 ewretd=0.069289 ewretx=0.067252 sprtrn=0.058796 year=2010 month=. _ERROR_=1 _N_=3 NOTE: Invalid argument to function MONTH(20100430) at line 654 column 9. PERMNO=10001 date=20100430 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100331 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100430 RCRDDT=20100415 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100527 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.25 ASKHI=11.61 PRC=11.39 VOL=3350 RET=0.124385 BID=11.57 ASK=11.65 SHROUT=6070 CFACPR=1 CFACSHR=1 ALTPRC=11.39 SPREAD=. ALTPRCDT=20100430 RETX=0.119961 vwretd=0.020043 vwretx=0.01893 ewretd=0.057843 ewretx=0.056698 sprtrn=0.014759 year=2010 month=. _ERROR_=1 _N_=4 NOTE: Invalid argument to function MONTH(20100528) at line 654 column 9. PERMNO=10001 date=20100528 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100428 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100531 RCRDDT=20100514 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100629 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.39 ASKHI=11.8 PRC=11.4 VOL=3451 RET=0.004829 BID=11.37 ASK=11.4 SHROUT=6071 CFACPR=1 CFACSHR=1 ALTPRC=11.4 SPREAD=. ALTPRCDT=20100528 RETX=0.000878 vwretd=-0.079136 vwretx=-0.081224 ewretd=-0.076929 ewretx=-0.078435 sprtrn=-0.081976 year=2010 month=. _ERROR_=1 _N_=5 NOTE: Invalid argument to function MONTH(20100630) at line 654 column 9. PERMNO=10001 date=20100630 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100526 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100630 RCRDDT=20100615 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100708 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.86 ASKHI=12.3 PRC=10.86 VOL=3537 RET=-0.043421 BID=10.85 ASK=10.91 SHROUT=6080 CFACPR=1 CFACSHR=1 ALTPRC=10.86 SPREAD=. ALTPRCDT=20100630 RETX=-0.047368 vwretd=-0.050725 vwretx=-0.052465 ewretd=-0.056799 ewretx=-0.058868 sprtrn=-0.053882 year=2010 month=. _ERROR_=1 _N_=6 NOTE: Invalid argument to function MONTH(20100730) at line 654 column 9. PERMNO=10001 date=20100730 NAMEENDT=20170803 SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100701 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100730 RCRDDT=20100715 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100830 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.85 ASKHI=11.81 PRC=11.72 VOL=2858 RET=0.083333 BID=11.68 ASK=11.75 SHROUT=6080 CFACPR=1 CFACSHR=1 ALTPRC=11.72 SPREAD=. ALTPRCDT=20100730 RETX=0.07919 vwretd=0.070292 vwretx=0.068594 ewretd=0.05994 ewretx=0.058682 sprtrn=0.068778 year=2010 month=. _ERROR_=1 _N_=7 NOTE: Invalid argument to function MONTH(20100831) at line 654 column 9. PERMNO=10001 date=20100831 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100728 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100831 RCRDDT=20100813 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100929 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.15 ASKHI=12.35 PRC=10.371 VOL=2595 RET=-0.111263 BID=10.4 ASK=10.6 SHROUT=6073 CFACPR=1 CFACSHR=1 ALTPRC=10.371 SPREAD=. ALTPRCDT=20100831 RETX=-0.115102 vwretd=-0.042813 vwretx=-0.044938 ewretd=-0.047566 ewretx=-0.049083 sprtrn=-0.047449 year=2010 month=. _ERROR_=1 _N_=8 NOTE: Invalid argument to function MONTH(20100930) at line 654 column 9. PERMNO=10001 date=20100930 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100827 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100930 RCRDDT=20100915 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101028 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.435 ASKHI=11.24 PRC=11.12 VOL=1591 RET=0.07656 BID=11.05 ASK=11.12 SHROUT=6073 CFACPR=1 CFACSHR=1 ALTPRC=11.12 SPREAD=. ALTPRCDT=20100930 RETX=0.072221 vwretd=0.091518 vwretx=0.089635 ewretd=0.096418 ewretx=0.094485 sprtrn=0.087551 year=2010 month=. _ERROR_=1 _N_=9 NOTE: Invalid argument to function MONTH(20101029) at line 654 column 9. PERMNO=10001 date=20101029 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100929 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101029 RCRDDT=20101015 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101129 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11 ASKHI=11.45 PRC=11.4399 VOL=1803 RET=0.032815 BID=11.28 ASK=11.44 SHROUT=6074 CFACPR=1 CFACSHR=1 ALTPRC=11.4399 SPREAD=. ALTPRCDT=20101029 RETX=0.028768 vwretd=0.038531 vwretx=0.037009 ewretd=0.040681 ewretx=0.039488 sprtrn=0.036856 year=2010 month=. _ERROR_=1 _N_=10 NOTE: Invalid argument to function MONTH(20101130) at line 654 column 9. PERMNO=10001 date=20101130 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20101101 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101130 RCRDDT=20101115 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101230 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.79 ASKHI=11.35 PRC=10.04 VOL=12695 RET=-0.118436 BID=10.04 ASK=10.05 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.04 SPREAD=. ALTPRCDT=20101130 RETX=-0.12237 vwretd=0.005108 vwretx=0.002908 ewretd=0.010736 ewretx=0.008972 sprtrn=-0.00229 year=2010 month=. _ERROR_=1 _N_=11 NOTE: Invalid argument to function MONTH(20101231) at line 654 column 9. PERMNO=10001 date=20101231 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20101201 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101231 RCRDDT=20101215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110130 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.08 ASKHI=10.53 PRC=10.52 VOL=5200 RET=0.052291 BID=10.49 ASK=10.52 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.52 SPREAD=. ALTPRCDT=20101231 RETX=0.047809 vwretd=0.06715 vwretx=0.064817 ewretd=0.068851 ewretx=0.065469 sprtrn=0.0653 year=2010 month=. _ERROR_=1 _N_=12 NOTE: Invalid argument to function MONTH(20110131) at line 654 column 9. PERMNO=10001 date=20110131 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110105 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110131 RCRDDT=20110114 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110227 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.4 ASKHI=10.92 PRC=10.78 VOL=4648 RET=0.028992 BID=10.72 ASK=10.74 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.78 SPREAD=. ALTPRCDT=20110131 RETX=0.024715 vwretd=0.019157 vwretx=0.018203 ewretd=0.014412 ewretx=0.013611 sprtrn=0.022646 year=2011 month=. _ERROR_=1 _N_=13 NOTE: Invalid argument to function MONTH(20110228) at line 654 column 9. PERMNO=10001 date=20110228 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110126 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110228 RCRDDT=20110215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110330 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.76 ASKHI=10.99 PRC=10.98 VOL=4586 RET=0.022727 BID=10.96 ASK=10.99 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.98 SPREAD=. ALTPRCDT=20110228 RETX=0.018553 vwretd=0.038165 vwretx=0.036232 ewretd=0.037036 ewretx=0.035725 sprtrn=0.031957 year=2011 month=. _ERROR_=1 _N_=14 NOTE: Invalid argument to function MONTH(20110331) at line 654 column 9. PERMNO=10001 date=20110331 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110223 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110331 RCRDDT=20110315 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110428 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.825 ASKHI=11.73 PRC=11.73 VOL=4137 RET=0.072404 BID=11.72 ASK=11.73 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=11.73 SPREAD=. ALTPRCDT=20110331 RETX=0.068306 vwretd=0.003366 vwretx=0.001781 ewretd=0.008605 ewretx=0.006786 sprtrn=-0.001047 year=2011 month=. _ERROR_=1 _N_=15 NOTE: Invalid argument to function MONTH(20110429) at line 654 column 9. PERMNO=10001 date=20110429 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110330 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110429 RCRDDT=20110415 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110530 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.23 ASKHI=11.83 PRC=11.23 VOL=4109 RET=-0.038789 BID=11.21 ASK=11.23 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.23 SPREAD=. ALTPRCDT=20110429 RETX=-0.042626 vwretd=0.028688 vwretx=0.027573 ewretd=0.019203 ewretx=0.018109 sprtrn=0.028495 year=2011 month=. _ERROR_=1 _N_=16 NOTE: Invalid argument to function MONTH(20110531) at line 654 column 9. PERMNO=10001 date=20110531 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110427 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110531 RCRDDT=20110513 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110629 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.09 ASKHI=11.5 PRC=11.5 VOL=4979 RET=0.02805 BID=11.46 ASK=11.5 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.5 SPREAD=. ALTPRCDT=20110531 RETX=0.024043 vwretd=-0.014935 vwretx=-0.016942 ewretd=-0.018549 ewretx=-0.020191 sprtrn=-0.013501 year=2011 month=. _ERROR_=1 _N_=17 NOTE: Invalid argument to function MONTH(20110630) at line 654 column 9. PERMNO=10001 date=20110630 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110531 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110630 RCRDDT=20110615 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110728 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.32 ASKHI=11.6 PRC=11.55 VOL=2472 RET=0.008261 BID=11.51 ASK=11.55 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.55 SPREAD=. ALTPRCDT=20110630 RETX=0.004348 vwretd=-0.018395 vwretx=-0.020161 ewretd=-0.024106 ewretx=-0.026251 sprtrn=-0.018258 year=2011 month=. _ERROR_=1 _N_=18 NOTE: Invalid argument to function MONTH(20110729) at line 654 column 9. PERMNO=10001 date=20110729 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110615 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110729 RCRDDT=20110715 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110830 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.14 ASKHI=11.8699 PRC=11.18 VOL=2860 RET=-0.028139 BID=11.13 ASK=11.18 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.18 SPREAD=. ALTPRCDT=20110729 RETX=-0.032035 vwretd=-0.02247 vwretx=-0.023611 ewretd=-0.021813 ewretx=-0.022838 sprtrn=-0.021474 year=2011 month=. _ERROR_=1 _N_=19 NOTE: Invalid argument to function MONTH(20110831) at line 654 column 9. WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed. PERMNO=10001 date=20110831 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110727 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110831 RCRDDT=20110815 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110929 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.77 ASKHI=11.55 PRC=10.98 VOL=5307 RET=-0.013864 BID=10.97 ASK=11.02 SHROUT=8152 CFACPR=1 CFACSHR=1 ALTPRC=10.98 SPREAD=. ALTPRCDT=20110831 RETX=-0.017889 vwretd=-0.057472 vwretx=-0.059612 ewretd=-0.075715 ewretx=-0.077329 sprtrn=-0.056791 year=2011 month=. _ERROR_=1 _N_=20 NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values. Each place is given by: (Number of times) at (Line):(Column). 660140 at 654:9 NOTE: There were 677216 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR2 has 660140 observations and 66 variables. NOTE: DATA statement used (Total process time): real time 3.32 seconds user cpu time 0.35 seconds system cpu time 0.40 seconds memory 3585.62k OS Memory 38324.00k Timestamp 03/27/2018 07:07:00 PM Step Count 87 Switch Count 1 Page Faults 0 Page Reclaims 498 Page Swaps 0 Voluntary Context Switches 14289 Involuntary Context Switches 36 Block Input Operations 669184 Block Output Operations 673544 657 658 proc sort data=paper.CSRP_Monthly_Stock_char2; 659 by ticker year; 660 run; NOTE: There were 660140 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR2. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR2 has 660140 observations and 66 variables. NOTE: PROCEDURE SORT used (Total process time): real time 3.62 seconds user cpu time 0.65 seconds system cpu time 0.54 seconds memory 381178.04k OS Memory 414816.00k Timestamp 03/27/2018 07:07:03 PM Step Count 88 Switch Count 1 Page Faults 0 Page Reclaims 92525 Page Swaps 0 Voluntary Context Switches 17438 Involuntary Context Switches 21 Block Input Operations 673568 Block Output Operations 673544 661 662 *find additional bad data: tickers with 2 CEO records for the same year; 663 proc freq data=paper.Compustat_ExecuComp2; 664 tables ticker * year / noprint out=paper.multiple_ceos (where=(count > 1)); 665 run; NOTE: There were 13678 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP2. NOTE: The data set PAPER.MULTIPLE_CEOS has 0 observations and 4 variables. NOTE: PROCEDURE FREQ used (Total process time): real time 0.09 seconds user cpu time 0.03 seconds system cpu time 0.02 seconds memory 5688.75k OS Memory 39888.00k Timestamp 03/27/2018 07:07:04 PM Step Count 89 Switch Count 5 Page Faults 0 Page Reclaims 816 Page Swaps 0 Voluntary Context Switches 509 Involuntary Context Switches 0 Block Input Operations 55840 Block Output Operations 1320 666 667 *Remove all bad years from both data sources; 668 data paper.Compustat_ExecuComp3; 669 merge paper.Compustat_ExecuComp2 670 paper.multiple_CEOs (keep=ticker year in=had_multiple_CEOs); 671 by ticker year; 672 if had_multiple_CEOs then delete; 673 run; NOTE: There were 13678 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP2. NOTE: There were 0 observations read from the data set PAPER.MULTIPLE_CEOS. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP3 has 13678 observations and 107 variables. NOTE: DATA statement used (Total process time): real time 0.12 seconds user cpu time 0.02 seconds system cpu time 0.03 seconds memory 4074.90k OS Memory 38584.00k Timestamp 03/27/2018 07:07:04 PM Step Count 90 Switch Count 1 Page Faults 0 Page Reclaims 540 Page Swaps 0 Voluntary Context Switches 1056 Involuntary Context Switches 1 Block Input Operations 288 Block Output Operations 55816 674 675 data paper.CSRP_Monthly_Stock_char3; 676 merge paper.CSRP_Monthly_Stock_char2 677 paper.multiple_CEOs (keep=ticker year in=had_multiple_CEOs); 678 by ticker year; 679 if had_multiple_CEOs then delete; 680 run; NOTE: There were 660140 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR2. NOTE: There were 0 observations read from the data set PAPER.MULTIPLE_CEOS. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR3 has 660140 observations and 66 variables. NOTE: DATA statement used (Total process time): real time 3.37 seconds user cpu time 0.33 seconds system cpu time 0.42 seconds memory 4033.34k OS Memory 38584.00k Timestamp 03/27/2018 07:07:07 PM Step Count 91 Switch Count 1 Page Faults 0 Page Reclaims 536 Page Swaps 0 Voluntary Context Switches 15299 Involuntary Context Switches 24 Block Input Operations 673568 Block Output Operations 673544 681 682 *find additional bad data: multiple return records for the same month/year; 683 proc freq data=paper.CSRP_Monthly_Stock_char3; 684 tables ticker * year * month / noprint out=paper.multiple_returns; 685 run; NOTE: There were 660140 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR3. NOTE: The data set PAPER.MULTIPLE_RETURNS has 58422 observations and 5 variables. NOTE: PROCEDURE FREQ used (Total process time): real time 0.83 seconds user cpu time 0.34 seconds system cpu time 0.17 seconds memory 13491.68k OS Memory 51036.00k Timestamp 03/27/2018 07:07:08 PM Step Count 92 Switch Count 5 Page Faults 0 Page Reclaims 3614 Page Swaps 0 Voluntary Context Switches 4166 Involuntary Context Switches 10 Block Input Operations 673568 Block Output Operations 12584 686 687 *Remove all matching year data for multiple returns; 688 proc sort data=paper.multiple_returns out=multiple_returns (keep=ticker year) NODUPKEY; 689 by ticker year; 690 run; NOTE: There were 58422 observations read from the data set PAPER.MULTIPLE_RETURNS. NOTE: 0 observations with duplicate key values were deleted. NOTE: The data set WORK.MULTIPLE_RETURNS has 58422 observations and 2 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.02 seconds user cpu time 0.01 seconds system cpu time 0.00 seconds memory 7002.12k OS Memory 41428.00k Timestamp 03/27/2018 07:07:08 PM Step Count 93 Switch Count 1 Page Faults 0 Page Reclaims 1254 Page Swaps 0 Voluntary Context Switches 22 Involuntary Context Switches 0 Block Input Operations 4640 Block Output Operations 2064 691 692 data paper.Compustat_ExecuComp4; 693 merge paper.Compustat_ExecuComp3 694 multiple_returns (in=had_multiple_returns); 695 by ticker year; 696 if had_multiple_returns then delete; 697 run; NOTE: There were 13678 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP3. NOTE: There were 58422 observations read from the data set WORK.MULTIPLE_RETURNS. NOTE: The data set PAPER.COMPUSTAT_EXECUCOMP4 has 1394 observations and 107 variables. NOTE: DATA statement used (Total process time): real time 0.09 seconds user cpu time 0.04 seconds system cpu time 0.02 seconds memory 4988.28k OS Memory 39608.00k Timestamp 03/27/2018 07:07:08 PM Step Count 94 Switch Count 1 Page Faults 0 Page Reclaims 783 Page Swaps 0 Voluntary Context Switches 236 Involuntary Context Switches 4 Block Input Operations 55840 Block Output Operations 5896 698 699 data paper.CSRP_Monthly_Stock_char4; 700 merge paper.CSRP_Monthly_Stock_char3 701 multiple_returns (in=had_multiple_returns); 702 by ticker year; 703 if had_multiple_returns then delete; 704 run; NOTE: There were 660140 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR3. NOTE: There were 58422 observations read from the data set WORK.MULTIPLE_RETURNS. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR4 has 0 observations and 66 variables. NOTE: DATA statement used (Total process time): real time 0.26 seconds user cpu time 0.18 seconds system cpu time 0.07 seconds memory 3702.18k OS Memory 37816.00k Timestamp 03/27/2018 07:07:08 PM Step Count 95 Switch Count 1 Page Faults 0 Page Reclaims 547 Page Swaps 0 Voluntary Context Switches 46 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 264 705 706 *create new variable annualized growth; 707 data paper.CSRP_annual_returns; 708 set paper.CSRP_Monthly_Stock_char4; 709 by ticker year; 710 retain annual_return 1; 711 annual_return = annual_return * (1 + RET); 712 if month = 12 or last.ticker; 713 annual_return = (annual_return - 1) * 100; 714 output; 715 annual_return = 1; 716 keep ticker year annual_return; 717 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 711:38 NOTE: There were 0 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR4. NOTE: The data set PAPER.CSRP_ANNUAL_RETURNS has 0 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds memory 962.62k OS Memory 36020.00k Timestamp 03/27/2018 07:07:08 PM Step Count 96 Switch Count 1 Page Faults 0 Page Reclaims 125 Page Swaps 0 Voluntary Context Switches 49 Involuntary Context Switches 0 Block Input Operations 288 Block Output Operations 264 718 719 *use proc contents to see if there is a type mismatch; 720 proc contents 721 data=paper.annual_returns; ERROR: File PAPER.ANNUAL_RETURNS.DATA does not exist. 722 run; NOTE: Statements not processed because of errors noted above. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.00 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds memory 326.62k OS Memory 35760.00k Timestamp 03/27/2018 07:07:08 PM Step Count 97 Switch Count 0 Page Faults 0 Page Reclaims 48 Page Swaps 0 Voluntary Context Switches 7 Involuntary Context Switches 0 Block Input Operations 0 Block Output Operations 8 NOTE: The SAS System stopped processing this step because of errors. 723 724 proc contents 725 data=paper.Compustat_ExecuComp4; 726 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.16 seconds user cpu time 0.16 seconds system cpu time 0.01 seconds memory 4622.51k OS Memory 37044.00k Timestamp 03/27/2018 07:07:08 PM Step Count 98 Switch Count 0 Page Faults 0 Page Reclaims 334 Page Swaps 0 Voluntary Context Switches 12 Involuntary Context Switches 0 Block Input Operations 288 Block Output Operations 104 727 728 *Merge CEO data and firm data by year. Use CUSIP from CEO data; 729 DATA paper.ceo_firm ; 730 length ticker $5; 731 MERGE paper.CSRP_annual_returns 732 paper.compustat_execucomp4; 733 BY ticker; 734 RUN; NOTE: There were 0 observations read from the data set PAPER.CSRP_ANNUAL_RETURNS. NOTE: There were 1394 observations read from the data set PAPER.COMPUSTAT_EXECUCOMP4. NOTE: The data set PAPER.CEO_FIRM has 1394 observations and 108 variables. NOTE: DATA statement used (Total process time): real time 0.03 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds memory 4072.34k OS Memory 39096.00k Timestamp 03/27/2018 07:07:09 PM Step Count 99 Switch Count 1 Page Faults 0 Page Reclaims 584 Page Swaps 0 Voluntary Context Switches 179 Involuntary Context Switches 0 Block Input Operations 5920 Block Output Operations 5896 735 736 proc contents 737 data=paper.ceo_firm; 738 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.15 seconds user cpu time 0.15 seconds system cpu time 0.00 seconds memory 2337.00k OS Memory 37300.00k Timestamp 03/27/2018 07:07:09 PM Step Count 100 Switch Count 0 Page Faults 0 Page Reclaims 308 Page Swaps 0 Voluntary Context Switches 15 Involuntary Context Switches 0 Block Input Operations 288 Block Output Operations 88 739 740 *remove missing return data; 741 data paper.ceo_firm; 742 set paper.ceo_firm; 743 if annual_return = . then delete; 744 run; NOTE: There were 1394 observations read from the data set PAPER.CEO_FIRM. NOTE: The data set PAPER.CEO_FIRM has 0 observations and 108 variables. NOTE: DATA statement used (Total process time): real time 0.02 seconds user cpu time 0.01 seconds system cpu time 0.01 seconds memory 2428.15k OS Memory 37044.00k Timestamp 03/27/2018 07:07:09 PM Step Count 101 Switch Count 1 Page Faults 0 Page Reclaims 314 Page Swaps 0 Voluntary Context Switches 88 Involuntary Context Switches 0 Block Input Operations 5632 Block Output Operations 264 745 746 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 758
Thanks for the help!
Have you noticed the message:
NOTE: Invalid argument to function MONTH(20100129) at line 654 column 9.
It seems that the variable DATE is not a sas data varioable but a simple integer, which unables using function month().
You can convert the '20100901' numeric variable into a sas date by:
date = input(put(date,z8.),yymmdd8.);
Try it.
@Shmuel where in the program exactly would this go? Thanks!
Here are your steps to import and check the date:
*import csrp dataset;
PROC IMPORT out=paper.CSRP_Monthly_Stock_char
datafile="~/425/425_Final_Paper/CSRP_MonthlyStock_char.csv"
DBMS=CSV replace;
getnames= yes;
guessingrows=max;
run;
*remove bad data;
data paper.CSRP_Monthly_Stock_char2;
set paper.CSRP_Monthly_Stock_char;
if cusip = ' ' then delete;
if ret = . then delete;
year = int( date/10000 );
month = month(date);
if cusip =: '?' then cusip = substr(cusip, 2);
run;
I prefer enter a mid step of converting the date, oterwise you can enter the conversion in the 2nd step:
*remove bad data;
data paper.CSRP_Monthly_Stock_char2;
set paper.CSRP_Monthly_Stock_char;
if cusip = ' ' then delete;
if ret = . then delete;
data = input(put(date,z8.),yymmdd8.);
year = year(date);
/*********
year = int( date/10000 );
**********/
month = month(date);
if cusip =: '?' then cusip = substr(cusip, 2);
run;
After conversion you should check - are there other statements relating to the DATE variable,
and do you treat it properly.
I added your data step. Thanks for the suggestion! Here is the new log:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 70 71 *remove bad data; 72 data paper.CSRP_Monthly_Stock_char2; 73 set paper.CSRP_Monthly_Stock_char; 74 if cusip = ' ' then delete; 75 if ret = . then delete; 76 data = input(put(date,z8.),yymmdd8.); 77 year = year(date); 78 month = month(date); 79 if cusip =: '?' then cusip = substr(cusip, 2); 80 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 75:4 NOTE: Invalid argument to function YEAR(20100129) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100129) at line 78 column 9. PERMNO=10001 date=20100129 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20091216 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100129 RCRDDT=20100115 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100225 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.86 ASKHI=10.5 PRC=10.06 VOL=3104 RET=-0.018932 BID=10.06 ASK=10.15 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.06 SPREAD=. ALTPRCDT=20100129 RETX=-0.023301 vwretd=-0.037096 vwretx=-0.038109 ewretd=-0.011388 ewretx=-0.012292 sprtrn=-0.036974 data=18291 year=. month=. _ERROR_=1 _N_=1 NOTE: Invalid argument to function YEAR(20100226) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100226) at line 78 column 9. PERMNO=10001 date=20100226 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100128 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100226 RCRDDT=20100215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100330 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.92 ASKHI=10.2201 PRC=10.0084 VOL=1510 RET=-0.000656 BID=10 ASK=10.04 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.0084 SPREAD=. ALTPRCDT=20100226 RETX=-0.005129 vwretd=0.034774 vwretx=0.032688 ewretd=0.033603 ewretx=0.032232 sprtrn=0.028514 data=18319 year=. month=. _ERROR_=1 _N_=2 NOTE: Invalid argument to function YEAR(20100331) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100331) at line 78 column 9. PERMNO=10001 date=20100331 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100302 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100331 RCRDDT=20100315 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100429 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.91 ASKHI=10.18 PRC=10.17 VOL=2283 RET=0.020643 BID=10.17 ASK=10.23 SHROUT=4361 CFACPR=1 CFACSHR=1 ALTPRC=10.17 SPREAD=. ALTPRCDT=20100331 RETX=0.016146 vwretd=0.063606 vwretx=0.06192 ewretd=0.069289 ewretx=0.067252 sprtrn=0.058796 data=18352 year=. month=. _ERROR_=1 _N_=3 NOTE: Invalid argument to function YEAR(20100430) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100430) at line 78 column 9. PERMNO=10001 date=20100430 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100331 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100430 RCRDDT=20100415 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100527 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.25 ASKHI=11.61 PRC=11.39 VOL=3350 RET=0.124385 BID=11.57 ASK=11.65 SHROUT=6070 CFACPR=1 CFACSHR=1 ALTPRC=11.39 SPREAD=. ALTPRCDT=20100430 RETX=0.119961 vwretd=0.020043 vwretx=0.01893 ewretd=0.057843 ewretx=0.056698 sprtrn=0.014759 data=18382 year=. month=. _ERROR_=1 _N_=4 NOTE: Invalid argument to function YEAR(20100528) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100528) at line 78 column 9. PERMNO=10001 date=20100528 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100428 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100531 RCRDDT=20100514 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100629 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.39 ASKHI=11.8 PRC=11.4 VOL=3451 RET=0.004829 BID=11.37 ASK=11.4 SHROUT=6071 CFACPR=1 CFACSHR=1 ALTPRC=11.4 SPREAD=. ALTPRCDT=20100528 RETX=0.000878 vwretd=-0.079136 vwretx=-0.081224 ewretd=-0.076929 ewretx=-0.078435 sprtrn=-0.081976 data=18410 year=. month=. _ERROR_=1 _N_=5 NOTE: Invalid argument to function YEAR(20100630) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100630) at line 78 column 9. PERMNO=10001 date=20100630 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=29269V10 TICKER=EGAS COMNAM=ENERGY INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100526 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100630 RCRDDT=20100615 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100708 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.86 ASKHI=12.3 PRC=10.86 VOL=3537 RET=-0.043421 BID=10.85 ASK=10.91 SHROUT=6080 CFACPR=1 CFACSHR=1 ALTPRC=10.86 SPREAD=. ALTPRCDT=20100630 RETX=-0.047368 vwretd=-0.050725 vwretx=-0.052465 ewretd=-0.056799 ewretx=-0.058868 sprtrn=-0.053882 data=18443 year=. month=. _ERROR_=1 _N_=6 NOTE: Invalid argument to function YEAR(20100730) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100730) at line 78 column 9. PERMNO=10001 date=20100730 NAMEENDT=20170803 SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100701 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100730 RCRDDT=20100715 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100830 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.85 ASKHI=11.81 PRC=11.72 VOL=2858 RET=0.083333 BID=11.68 ASK=11.75 SHROUT=6080 CFACPR=1 CFACSHR=1 ALTPRC=11.72 SPREAD=. ALTPRCDT=20100730 RETX=0.07919 vwretd=0.070292 vwretx=0.068594 ewretd=0.05994 ewretx=0.058682 sprtrn=0.068778 data=18473 year=. month=. _ERROR_=1 _N_=7 NOTE: Invalid argument to function YEAR(20100831) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100831) at line 78 column 9. PERMNO=10001 date=20100831 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100728 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100831 RCRDDT=20100813 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20100929 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.15 ASKHI=12.35 PRC=10.371 VOL=2595 RET=-0.111263 BID=10.4 ASK=10.6 SHROUT=6073 CFACPR=1 CFACSHR=1 ALTPRC=10.371 SPREAD=. ALTPRCDT=20100831 RETX=-0.115102 vwretd=-0.042813 vwretx=-0.044938 ewretd=-0.047566 ewretx=-0.049083 sprtrn=-0.047449 data=18505 year=. month=. _ERROR_=1 _N_=8 NOTE: Invalid argument to function YEAR(20100930) at line 77 column 8. NOTE: Invalid argument to function MONTH(20100930) at line 78 column 9. PERMNO=10001 date=20100930 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100827 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20100930 RCRDDT=20100915 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101028 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.435 ASKHI=11.24 PRC=11.12 VOL=1591 RET=0.07656 BID=11.05 ASK=11.12 SHROUT=6073 CFACPR=1 CFACSHR=1 ALTPRC=11.12 SPREAD=. ALTPRCDT=20100930 RETX=0.072221 vwretd=0.091518 vwretx=0.089635 ewretd=0.096418 ewretx=0.094485 sprtrn=0.087551 data=18535 year=. month=. _ERROR_=1 _N_=9 NOTE: Invalid argument to function YEAR(20101029) at line 77 column 8. NOTE: Invalid argument to function MONTH(20101029) at line 78 column 9. PERMNO=10001 date=20101029 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20100929 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101029 RCRDDT=20101015 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101129 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11 ASKHI=11.45 PRC=11.4399 VOL=1803 RET=0.032815 BID=11.28 ASK=11.44 SHROUT=6074 CFACPR=1 CFACSHR=1 ALTPRC=11.4399 SPREAD=. ALTPRCDT=20101029 RETX=0.028768 vwretd=0.038531 vwretx=0.037009 ewretd=0.040681 ewretx=0.039488 sprtrn=0.036856 data=18564 year=. month=. _ERROR_=1 _N_=10 NOTE: Invalid argument to function YEAR(20101130) at line 77 column 8. NOTE: Invalid argument to function MONTH(20101130) at line 78 column 9. PERMNO=10001 date=20101130 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20101101 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101130 RCRDDT=20101115 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20101230 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=9.79 ASKHI=11.35 PRC=10.04 VOL=12695 RET=-0.118436 BID=10.04 ASK=10.05 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.04 SPREAD=. ALTPRCDT=20101130 RETX=-0.12237 vwretd=0.005108 vwretx=0.002908 ewretd=0.010736 ewretx=0.008972 sprtrn=-0.00229 data=18596 year=. month=. _ERROR_=1 _N_=11 NOTE: Invalid argument to function YEAR(20101231) at line 77 column 8. NOTE: Invalid argument to function MONTH(20101231) at line 78 column 9. PERMNO=10001 date=20101231 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20101201 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20101231 RCRDDT=20101215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110130 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.08 ASKHI=10.53 PRC=10.52 VOL=5200 RET=0.052291 BID=10.49 ASK=10.52 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.52 SPREAD=. ALTPRCDT=20101231 RETX=0.047809 vwretd=0.06715 vwretx=0.064817 ewretd=0.068851 ewretx=0.065469 sprtrn=0.0653 data=18627 year=. month=. _ERROR_=1 _N_=12 NOTE: Invalid argument to function YEAR(20110131) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110131) at line 78 column 9. PERMNO=10001 date=20110131 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110105 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110131 RCRDDT=20110114 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110227 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.4 ASKHI=10.92 PRC=10.78 VOL=4648 RET=0.028992 BID=10.72 ASK=10.74 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.78 SPREAD=. ALTPRCDT=20110131 RETX=0.024715 vwretd=0.019157 vwretx=0.018203 ewretd=0.014412 ewretx=0.013611 sprtrn=0.022646 data=18658 year=. month=. _ERROR_=1 _N_=13 NOTE: Invalid argument to function YEAR(20110228) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110228) at line 78 column 9. PERMNO=10001 date=20110228 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110126 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110228 RCRDDT=20110215 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110330 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.76 ASKHI=10.99 PRC=10.98 VOL=4586 RET=0.022727 BID=10.96 ASK=10.99 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=10.98 SPREAD=. ALTPRCDT=20110228 RETX=0.018553 vwretd=0.038165 vwretx=0.036232 ewretd=0.037036 ewretx=0.035725 sprtrn=0.031957 data=18686 year=. month=. _ERROR_=1 _N_=14 NOTE: Invalid argument to function YEAR(20110331) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110331) at line 78 column 9. PERMNO=10001 date=20110331 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110223 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110331 RCRDDT=20110315 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110428 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.825 ASKHI=11.73 PRC=11.73 VOL=4137 RET=0.072404 BID=11.72 ASK=11.73 SHROUT=7834 CFACPR=1 CFACSHR=1 ALTPRC=11.73 SPREAD=. ALTPRCDT=20110331 RETX=0.068306 vwretd=0.003366 vwretx=0.001781 ewretd=0.008605 ewretx=0.006786 sprtrn=-0.001047 data=18717 year=. month=. _ERROR_=1 _N_=15 NOTE: Invalid argument to function YEAR(20110429) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110429) at line 78 column 9. PERMNO=10001 date=20110429 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110330 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110429 RCRDDT=20110415 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110530 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.23 ASKHI=11.83 PRC=11.23 VOL=4109 RET=-0.038789 BID=11.21 ASK=11.23 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.23 SPREAD=. ALTPRCDT=20110429 RETX=-0.042626 vwretd=0.028688 vwretx=0.027573 ewretd=0.019203 ewretx=0.018109 sprtrn=0.028495 data=18746 year=. month=. _ERROR_=1 _N_=16 NOTE: Invalid argument to function YEAR(20110531) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110531) at line 78 column 9. PERMNO=10001 date=20110531 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110427 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110531 RCRDDT=20110513 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110629 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.09 ASKHI=11.5 PRC=11.5 VOL=4979 RET=0.02805 BID=11.46 ASK=11.5 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.5 SPREAD=. ALTPRCDT=20110531 RETX=0.024043 vwretd=-0.014935 vwretx=-0.016942 ewretd=-0.018549 ewretx=-0.020191 sprtrn=-0.013501 data=18778 year=. month=. _ERROR_=1 _N_=17 NOTE: Invalid argument to function YEAR(20110630) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110630) at line 78 column 9. PERMNO=10001 date=20110630 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110531 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110630 RCRDDT=20110615 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110728 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.32 ASKHI=11.6 PRC=11.55 VOL=2472 RET=0.008261 BID=11.51 ASK=11.55 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.55 SPREAD=. ALTPRCDT=20110630 RETX=0.004348 vwretd=-0.018395 vwretx=-0.020161 ewretd=-0.024106 ewretx=-0.026251 sprtrn=-0.018258 data=18808 year=. month=. _ERROR_=1 _N_=18 NOTE: Invalid argument to function YEAR(20110729) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110729) at line 78 column 9. PERMNO=10001 date=20110729 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110615 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110729 RCRDDT=20110715 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110830 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=11.14 ASKHI=11.8699 PRC=11.18 VOL=2860 RET=-0.028139 BID=11.13 ASK=11.18 SHROUT=8151 CFACPR=1 CFACSHR=1 ALTPRC=11.18 SPREAD=. ALTPRCDT=20110729 RETX=-0.032035 vwretd=-0.02247 vwretx=-0.023611 ewretd=-0.021813 ewretx=-0.022838 sprtrn=-0.021474 data=18837 year=. month=. _ERROR_=1 _N_=19 NOTE: Invalid argument to function YEAR(20110831) at line 77 column 8. NOTE: Invalid argument to function MONTH(20110831) at line 78 column 9. WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed. PERMNO=10001 date=20110831 NAMEENDT=. SHRCD=11 EXCHCD=2 SICCD=4925 NCUSIP=36720410 TICKER=EGAS COMNAM=GAS NATURAL INC SHRCLS= TSYMBOL=EGAS NAICS=221210 PRIMEXCH=A TRDSTAT=A SECSTAT=R PERMCO=7953 ISSUNO=10398 HEXCD=2 HSICCD=4925 CUSIP=36720410 DCLRDT=20110727 DLAMT=. DLPDT=. DLSTCD=. NEXTDT=. PAYDT=20110831 RCRDDT=20110815 SHRFLG=0 HSICMG=. HSICIG=. DISTCD=1222 DIVAMT=0.045 FACPR=0 FACSHR=0 ACPERM=. ACCOMP=. SHRENDDT=20110929 NWPERM=. DLRETX= DLPRC=. DLRET= TRTSCD=5 NMSIND=5 MMCNT=0 NSDINX=1 BIDLO=10.77 ASKHI=11.55 PRC=10.98 VOL=5307 RET=-0.013864 BID=10.97 ASK=11.02 SHROUT=8152 CFACPR=1 CFACSHR=1 ALTPRC=10.98 SPREAD=. ALTPRCDT=20110831 RETX=-0.017889 vwretd=-0.057472 vwretx=-0.059612 ewretd=-0.075715 ewretx=-0.077329 sprtrn=-0.056791 data=18870 year=. month=. _ERROR_=1 _N_=20 NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values. Each place is given by: (Number of times) at (Line):(Column). 660140 at 77:8 660140 at 78:9 NOTE: There were 677216 observations read from the data set PAPER.CSRP_MONTHLY_STOCK_CHAR. NOTE: The data set PAPER.CSRP_MONTHLY_STOCK_CHAR2 has 660140 observations and 67 variables. NOTE: DATA statement used (Total process time): real time 4.42 seconds user cpu time 0.48 seconds system cpu time 0.43 seconds memory 3587.93k OS Memory 31148.00k Timestamp 03/27/2018 10:43:41 PM Step Count 29 Switch Count 1 Page Faults 0 Page Reclaims 1053 Page Swaps 0 Voluntary Context Switches 12839 Involuntary Context Switches 57 Block Input Operations 669504 Block Output Operations 681488 81 82 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 94
Sory, there was a mistype that you copied:
data = input(put(date,z8.),yymmdd8.);
should be
date = input(put(date,z8.),yymmdd8.);
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.