IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort to find day of the week


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Wed Nov 19, 2008 5:54 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Nov 19, 2008 6:57 pm
Reply with quote

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
View user's profile Send private message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Wed Nov 19, 2008 11:07 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Nov 19, 2008 11:25 pm
Reply with quote

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
View user's profile Send private message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Thu Nov 20, 2008 9:49 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 20, 2008 11:24 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 20, 2008 11:33 pm
Reply with quote

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
View user's profile Send private message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Fri Nov 21, 2008 12:25 am
Reply with quote

Hi Arun,

I need the day of the week of the current date - sorry for the confusion.

Thanks,
Aneesh.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Find the occurrence of Key Field (Par... DFSORT/ICETOOL 6
No new posts Find a record count/numeric is multip... COBOL Programming 1
Search our Forums:

Back to Top