Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
damu

New User

Joined: 26 Mar 2007
Posts: 4
Location: bangalore

 Posted: Thu May 24, 2007 6:18 pm    Post subject: Giving the logic for finding the day of the given year hi all, can any one help me by giving the logic for finding the day of the given year.

muthuvel

Active User

Joined: 29 Nov 2005
Posts: 217
Location: Chennai

Posted: Thu May 24, 2007 7:04 pm    Post subject: Re: to find day of the given year

System information will be present in the DATE field.You can use that
System information contained in the specified conceptual data items DATE,
DAY, DAY-OF-WEEK, or TIME, can be transferred into the identifier.

Syntax:

 Code: ACCEPT WS-VAR1 TO DATE

The format is YYMMDD
muthuvel

Active User

Joined: 29 Nov 2005
Posts: 217
Location: Chennai

 Posted: Thu May 24, 2007 7:06 pm    Post subject: Re: to find day of the given year The above will give the current day's information. For any day calculation in any year you can use the common date calculation used in your firm.
William Thompson

Global Moderator

Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

Posted: Thu May 24, 2007 7:18 pm    Post subject: Re: to find day of the given year

 damu wrote: can any one help me by giving the logic for finding the day of the given year.
Like in the Julian day of the year - YYDDD - from 1 to 366?
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

Posted: Thu May 24, 2007 9:02 pm    Post subject:

Hello,

 Quote: finding the day of the given year.

with a couple of examples.

I believe i understand what the "given year" is, but i am not clear on "the day".
damu

New User

Joined: 26 Mar 2007
Posts: 4
Location: bangalore

 Posted: Fri May 25, 2007 6:22 pm    Post subject: the day of given year is the given year means,suppose the year is 1981/05/06.what is the day of that date.
William Thompson

Global Moderator

Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

Posted: Fri May 25, 2007 7:40 pm    Post subject: Re: the day of given year is

 damu wrote: the given year means,suppose the year is 1981/05/06.what is the day of that date.
To give us clarity, try answering this: 2007/05/25, what is the day of that date?
agkshirsagar

Active Member

Joined: 27 Feb 2007
Posts: 686
Location: Earth

 Posted: Fri May 25, 2007 9:07 pm    Post subject: It is my guess,he wants 'day' means 'sunday monday tuesday..etc. I am not sure but 'May be' SQL can help in this case.. Or we have to implement what is called as Doomsday algorithm- Please see the link- http://everything2.com/index.pl?node_id=1023392 It should be fairly easy to implement in COBOL as C/C++ code is already given there.
enrico-sorichetti

Global Moderator

Joined: 14 Mar 2007
Posts: 10456
Location: italy

 Posted: Fri May 25, 2007 11:33 pm    Post subject: Re: Giving the logic for finding the day of the given year check Zeller's congruence algorithm here is the wikipedia url http://en.wikipedia.org/wiki/Zeller's_congruence
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics WRITE to VSAM giving duplicate RC picus_mf CICS 1 Fri Feb 23, 2018 2:52 pm Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm Finding the plan when code compiled u... Ahemad DB2 2 Fri Dec 01, 2017 6:38 pm Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us