Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to check a date is falling in between two given dates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Wed May 20, 2009 6:57 pm    Post subject: How to check a date is falling in between two given dates
Reply with quote

hi

i need to check input date in file is falling between two given dates.

pls suggest

thanks
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 20, 2009 7:10 pm    Post subject:
Reply with quote

NOTEB: Between means inclusive of lower and higher value.


If input-date GTEQ lower-given-date
and input-date LTEQ higher-given-date
then
the input-date falls between the two given dates.
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Wed May 20, 2009 7:17 pm    Post subject:
Reply with quote

wht is the format you suggest?

all dates are pic x(10) yyyy-mm-dd
will it work this format?

pls suggest
Back to top
View user's profile Send private message
star_dhruv2000

New User


Joined: 03 Nov 2006
Posts: 87
Location: Plymouth, MN USA

PostPosted: Fri May 22, 2009 11:53 pm    Post subject:
Reply with quote

Try convert dates in integer and compre them. Use DATE-OF-INTEGER and INTEGER-OF-DATE functions.

Basic date format in INTEGER-OF-DATE is CCYYMMDD.


Happy coding !!!
Cheers icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sat May 23, 2009 12:15 am    Post subject:
Reply with quote

Hello,

I must be missing something. . . icon_confused.gif

Quote:
If input-date GTEQ lower-given-date
and input-date LTEQ higher-given-date
then
the input-date falls between the two given dates.
How difficult is it to use the example posted by dbz and compare if a value is between 2006-10-01 and 2008-05-23?

Why would anything else be needed?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us