View previous topic :: View next topic
|
Author |
Message |
Aneesh
New User
Joined: 30 Sep 2006 Posts: 60
|
|
|
|
Hi,
I need to create a file that has the day of the week - Sun, Mon, Tue etc or a number indicator for the day 1 for Sunday, 2 for Mon etc.
Can this be done using syncsort?
Thanks,
Aneesh. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Aneesh,
Do you have an input file for this. It's not clear what you're trying to achieve. Please post a few sample input/output records. |
|
Back to top |
|
|
Aneesh
New User
Joined: 30 Sep 2006 Posts: 60
|
|
|
|
Hi,
Basically i need to have some processing in the jcl that is different for differnt days of the week. For that, i need to create a new file (FB LRECL 80) which has the current day of the week.
Is there any option like &DATE1 which would give the day of the week or any easy way to determine the current day of the week to write to a file.
Thanks,
Aneesh. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Aneesh,
Is it fine to have a number ranging from 1 to 7 in a file. Every time the file will have a number corresponding to the day of the week. Say '1' for Sun, '2' for Mon etc. If yes, you can easily do it in sort without any date function. But after having this in a file, how do you plan to process your jcl differently? |
|
Back to top |
|
|
Aneesh
New User
Joined: 30 Sep 2006 Posts: 60
|
|
|
|
Hi,
Yes. It woul dbe fine to write a number representing the day of the week.
I am planning to write this to a file only when the value meets a prticular day's value. The output file should be empty on the other days. The jcl processign would be controlled by an empty file check. We are not doing this through CA7 as this day is likely to be changed in the future.
Thanks,
Aneesh. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Aneesh,
Is this going to be a daily job?
Quote: |
I am planning to write this to a file only when the value meets a prticular day's value. The output file should be empty on the other days. The jcl processign would be controlled by an empty file check. We are not doing this through CA7 as this day is likely to be changed in the future. |
I dint get this. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Aneesh,
If you mean to find the day of the week from a random date, I dont think it's possible using any of the DATE functions in sort unless you use some exit routines. |
|
Back to top |
|
|
Aneesh
New User
Joined: 30 Sep 2006 Posts: 60
|
|
|
|
Hi Arun,
I need the day of the week of the current date - sorry for the confusion.
Thanks,
Aneesh. |
|
Back to top |
|
|
|