What is the question?
So flatfile has new records added each day.
Do the records contain a date?
– what does it look like and does it contain time?
– is it always in the same columns?
Are you certain that your CL will run every day that there is a date for or would
you need a strategy to get missing days or the part of the day after your CL runs.
OK, I would retain the date of the last record processed in a data area
CL would: 1. Rtv the value from the data area into &LastDate
2. Use the Cpyf Martin showed below but change to: INCCHAR(*RCD 1 *GT &LastDate)
where 1 is the Beginning column of the date field
3. Compute Yesterdays date in the CCYYMMDD format and put it in the data area
— if you have TAATOOL you can use ADDDAT to get this date in this format
4. FTP the file.