View previous topic :: View next topic
|
Author |
Message |
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
Hi,
I need to Identify records in a file which is having date of Current date - 7 days
Will there be any sort card can be used to identify records having timestamp less than 7 days from current date
Thanks |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes. Many examples here if your search for them. Examples and explanations in the manual.
I can't help but point out that using the current date is a recipe for confusion. What if the job runs before midnight? After? Is re-run 12 days later? Has to work for a particular date in testing and on through the cycle? |
|
Back to top |
|
|
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
We are doing for a report generation , and we are doing manually every day at particular time , its not a scheduled Batch Job |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK. And if someone wants it for a different date, remember to temporarily change the code.
As I said, there are examples here. The manual will also get you there. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Assuming you are having your date field in CCYYMMDD format you can use the following control cards
This assumes that your date field (CCYYMMDD) is at position 25
Code: |
//SYSIN DD *
OPTION COPY
INCLUDE COND=(25,8,CH,LE,DATE1-7)
//* |
|
|
Back to top |
|
|
|