634 Filename ameritot 634! '\\nyadpam\nyadpam_d\apps\CWA_Bondedge_INTMUTUALAMERI_TOT\Bondedge_upload_INTMUTUALAMERITOT. 634! csv'; 635 /* import the external file*/ 636 data _null_; 637 638 infile ameritot delimiter=',' MISSOVER DSD LRECL=32767 FirstOBS=2 OBS=4; 639 informat Date_To yymmdd10. ; 640 format Date_To yymmdd10. ; 641 call symputx("dateFromFile", date_to); 642 643 input Date_To $ 644 ; 645 646 647 run; NOTE: The infile AMERITOT is: Filename=\\nyadpam\nyadpam_d\apps\CWA_Bondedge_INTMUTUALAMERI_TOT\Bondedge_upload_INTMUTUAL AMERITOT.csv, RECFM=V,LRECL=32767,File Size (bytes)=134321, Last Modified=26Jul2019:08:55:10, Create Time=26Jul2019:08:54:59 NOTE: 3 records were read from the infile AMERITOT. The minimum record length was 103. The maximum record length was 114. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.04 seconds 648 649 *test macro variable is created and has a value. Will look like a number in the log; 650 %put &dateFromFile.; . 651 652 %macro readFile(date_to = ); 653 %if &date_to = %sysfunc(today()) %then %do; 654 655 *********************** 656 *Import code goes here* 657 ***********************; 658 /*creates a fileref for the external file*/ 659 Filename ameritot 659! '\\nyadpam\nyadpam_d\apps\CWA_Bondedge_INTMUTUALAMERI_TOT\Bondedge_upload_INTMUTUALAMERITOT. 659! csv'; 660 /* import the external file*/ 661 data bondedge_upload_tot2; 662 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ 663 infile ameritot delimiter=',' MISSOVER DSD LRECL=32767 664 FirstOBS=2; 665 informat Date_To $10. ; 666 informat CUSIP $14. ; 667 informat Market_Price $10. ; 668 informat Portfolio $21. ; 669 informat Orig_Face $17. ; 670 informat Actual_Par $18. ; 671 informat Book_Price $10. ; 672 informat Security_Type_Description $14. ; 673 format Date_To $10. ; 674 format CUSIP $14. ; 675 format Market_Price $10. ; 676 format Portfolio $21. ; 677 format Orig_Face $17. ; 678 format Actual_Par $18. ; 679 format Book_Price $10. ; 680 format Security_Type_Description $14. ; 681 input 682 Date_To $ 683 CUSIP $ 684 Market_Price $ 685 Portfolio $ 686 Orig_Face $ 687 Actual_Par $ 688 Book_Price $ 689 Security_Type_Description $ 690 ; 691 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ 692 693 run; 694 695 696 %end; 697 %mend; 698 699 %readFile(date_to = &dateFromFile.);