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
 

 

i want to subtract 45 days from the input date

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

New User


Joined: 15 Dec 2006
Posts: 7
Location: CHENNAI

PostPosted: Wed May 28, 2008 3:04 pm    Post subject: i want to subtract 45 days from the input date EZT
Reply with quote

i want to subtract 45 days from the input date(which is present in the input PS) using easytrieve
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 28, 2008 4:22 pm    Post subject:
Reply with quote

Well, here's the REXX code
Code:

DAYS = 7
DATEOUT = DATE('S',DATE('B',DATE('J'),'J')-DAYS,'B')     
TDAT = DATE('D',DATEOUT,'S')                               
JDAT = RIGHT(SUBSTR(DATEOUT,1,4),4,'0')!!RIGHT(TDAT,3,'0')

Which returns yyyyddd using either the system date as shown above, or can be easily modified to accept any date or format.

Works for leap years too .............. icon_biggrin.gif
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Thu May 29, 2008 2:53 am    Post subject:
Reply with quote

Do you have access to DATECONV?
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Thu May 29, 2008 4:11 pm    Post subject: Reply to: Easytrieve - how to get julian date from system th
Reply with quote

Hi,
First seperate the input date as WS-MM WS-DD WS-YYYY in the input record.
now declare a new variable as WS-Date and compute that as
WS-Date = WS-DD - 45.
I hope this will work.
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Thu May 29, 2008 7:36 pm    Post subject: Re: Reply to: Easytrieve - how to get julian date from syste
Reply with quote

anandinmainframe wrote:

now declare a new variable as WS-Date and compute that as
WS-Date = WS-DD - 45.


Did you account for the month/year changing?
Back to top
View user's profile Send private message
Shanmugavel

New User


Joined: 15 Dec 2006
Posts: 7
Location: CHENNAI

PostPosted: Thu May 29, 2008 9:23 pm    Post subject:
Reply with quote

date CONV and papl date function are not working
and also the month and year are taken in to account

But i tried using DATE2000 it works fine.
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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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