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 get yesterdays date ineazytrieve

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

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Mon Apr 13, 2009 6:57 pm    Post subject: How to get yesterdays date ineazytrieve
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: 2150
Location: At my coffee table

PostPosted: Mon Apr 13, 2009 7:41 pm    Post subject:
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    Post subject:
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: 103
Location: India

PostPosted: Tue Apr 14, 2009 1:52 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Apr 14, 2009 4:43 pm    Post subject:
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    Post subject:
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    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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
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


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