Hi Tom, You are correct the above code is giving the same effect but still the cpu usage is not going down. I have input file of 129632 records that needs to be split on the basis of start date and end date into two file . I don't want to include those dates to the input observation only want to use it for split. Please suggest. Code : DATA DATE_CHK; IF _N_ = 1 THEN DO; END_DATE = TODAY(); RETAIN END_DATE; CURRENT_DAY = DAY(TODAY()); TEMP_DATE=INTNX('MONTH',END_DATE,-3); START_DATE=TEMP_DATE + CURRENT_DAY - 1; RETAIN START_DATE ; END; INFILE INPUT1 ;--FILE HAS 129632 RECORDS INPUT @9 CODEDT $CHARZB10.; CODE_DATE=INPUT(CODEDT,YYMMDD10.); FILE ACTIVE; IF CODE_DATE >= START_DATE AND CODE_DATE <= END_DATE THEN PUT _INFILE_; FILE INACTIVE; IF CODE_DATE < START_DATE THEN PUT _INFILE_; RUN;
... View more