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
 

 

Date Manipulation in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
pecram24

New User


Joined: 12 Oct 2009
Posts: 35
Location: Chennai

PostPosted: Fri Jan 27, 2012 2:21 pm    Post subject: Date Manipulation in Easytrieve
Reply with quote

Hi,

Can anyone help me in this..

I need to compare two dates and the result will be the difference between the two dates.
for example..

WS-DUE-DATE W 10 A
WS-CAN-DATE W 10 A
WS-DATE-DIFF W 4 N VALUE 0

WS-DUE-DATE 20120120
WS-CAN-DATE 20120101

if we compare the above dates the difference should be in WS-DATE-DIFF.
WS-DATE-DIFF = 19



Thanks in advance.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Fri Jan 27, 2012 2:26 pm    Post subject: Reply to: Date Manipulation in Easytrieve
Reply with quote

If you "compare" two dates, you don't get access to the difference, your code just respects the path which results from the compare being true/false.

If you want to get a difference between dates, you'll have to subtract them, and to do that you'll need to convert them to days, or use some program to do it.
Back to top
View user's profile Send private message
pecram24

New User


Joined: 12 Oct 2009
Posts: 35
Location: Chennai

PostPosted: Fri Jan 27, 2012 2:49 pm    Post subject:
Reply with quote

thank u.. but how we can convert the date in such a format in easytrieve.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Fri Jan 27, 2012 3:05 pm    Post subject: Reply to: Date Manipulation in Easytrieve
Reply with quote

The usual way :-)

Do you have some date routine which is used by Cobol progams? If not, see if LE has something. Else you have to code it yourself, and may as well make it a sub-routine which can be used generally.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 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
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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