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

How to find reminder of division in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 30, 2007 12:01 am
Reply with quote

I want to check if year is a leap year or not. I want to know if the remainder of year/4 is zero or not.Is there any function in easy trieve?

Thanks In advance
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Nov 30, 2007 12:44 am
Reply with quote

Delip wrote:
I want to check if year is a leap year or not. I want to know if the remainder of year/4 is zero or not.Is there any function in easy trieve?

Thanks In advance

You need to check for years ending in 00 by dividing by 400 also.
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 30, 2007 1:39 am
Reply with quote

Thank you.But any idea how we can check
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Nov 30, 2007 1:45 am
Reply with quote

Hello,

One way is to multiply the answer by 4 and compare against the original value. If they are equal, the number is divisible by 4.

As Craig mentioned, there are additional considerations to determine leap year.
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Sat Dec 01, 2007 1:39 am
Reply with quote

Thank you.It is working now.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Dec 01, 2007 2:12 am
Reply with quote

You're welcome icon_smile.gif

Thank you for letting us know it is working.

d
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 -> CA Products

 


Similar Topics
Topic Forum Replies
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 Count the number of characters in a f... CA Products 1
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