DATEIN DD *
/*
//DATEOUT DD DSN=MZ7P.TEST.SASDATE,
// DISP=(OLD,PASS,DELETE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(TRK,(10,10),RLSE),
// UNIT=TEMPDISK
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DATA DATES;
INPUT DATEI YYMMDD10.;
INFILE DATEIN;
RUN;
DATA DATE_CHECK;
SET DATES;
IF DATEI = ' ' THEN
DO;
DATEVL = (TODAY() - 1);
FORMAT DATEVL YYMMDDN8.;
END;
ELSE
DO;
DATEVL = DATEI;
FORMAT DATEVL YYMMDDN8.;
END;
FILE DATEOUT;
PUT DATEVL;
PROC PRINT;
RUN;
RUN;
//STEP40 EXEC PLIXG,
/*
//DATEOUT DD DSN=MZ7P.TEST.SASDATE,
// DISP=(OLD,PASS,DELETE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(TRK,(10,10),RLSE),
// UNIT=TEMPDISK
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DATA DATES;
INPUT DATEI YYMMDD10.;
INFILE DATEIN;
RUN;
DATA DATE_CHECK;
SET DATES;
IF DATEI = ' ' THEN
DO;
DATEVL = (TODAY() - 1);
FORMAT DATEVL YYMMDDN8.;
END;
ELSE
DO;
DATEVL = DATEI;
FORMAT DATEVL YYMMDDN8.;
END;
FILE DATEOUT;
PUT DATEVL;
PROC PRINT;
RUN;
RUN;
//STEP40 EXEC PLIXG,
My Else condition works perfectly , when there is nothing entered in DATEIN it needs to go into IF , This only works when i have a blank line after DATEIN. Can anyone help me on this ?