Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
cvishu,
You don't need a second file. you can directly use DATE1 in sort which gives you the current date in yyyymmdd format. Assuming your input is FB 80 bytes and your date field is in pos 1, the following JCL will give you the desired results. Just put your input date in yyymmdd format at pos 81 using inrec and we will use that to compare it against current date - 45 days
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
cvishu,
Sort products do NOT have the capability of getting relative dates from any given date.
If business day meant Mon - Fri, then we can check that subtract days appropriately from it.
For example if you are running on MON-THU we subtract 45 days, if we are running on SAT we subtract 46 days and if are running on Sunday we subtract 47 days. Let me know if you are interested in this procedure and I will show you a way to do it