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

How to get yesterdays date ineazytrieve


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

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Mon Apr 13, 2009 6:57 pm
Reply with quote

Hi All,

Aow to get yesterdays in Easytrieve??is there any command or function for taht?

Thank you,
Ravi
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Apr 13, 2009 7:41 pm
Reply with quote

Subtract one from today's date.
And check for date going to zero.
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Tue Apr 14, 2009 12:24 pm
Reply with quote

Hi,

Define a variable and set the variable equal to:
SYSDATE - 1
The date format will be (mm/dd/yy format)
OR
SYSDATE-LONG - 1
The date format will be (mm/dd/ccyy format)
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Tue Apr 14, 2009 1:52 pm
Reply with quote

Hi,
I tried the following code.
Code:

ws- date                w 008 a
*
*
ws-date = sysdate - 1
*
*


Bu t ia m getting the error
Invalid length,type or decimal places ws-date
Invalid length,type or decimal places sysdate
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Apr 14, 2009 4:43 pm
Reply with quote

hiravibk wrote:
Hi,
I tried the following code.
Code:

ws- date                w 008 a
*
*
ws-date = sysdate - 1
*
*


Bu t ia m getting the error
Invalid length,type or decimal places ws-date
Invalid length,type or decimal places sysdate
Think, how would you subtract one day from DD when the DD was part of a character variable consisting of MM/DD/YY?
You say you have COBOL skills, how would you do it in COBOL? The EZT way would be the same......
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Tue Apr 14, 2009 4:53 pm
Reply with quote

Ravi,

The date should be converted to julian before subtracting one from the date. DATECONV routine converts a date from one format to another.
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top