View previous topic :: View next topic
|
Author |
Message |
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Hi,
I used to code an SQL query in cobol whenever I had to play with dates.
Ex:
Select date(:ws-date1) - date(ws-date2) into :ws-date-test from sysibm.sysdummy1;
This time I had to play with dates in EZT.
Ex: To extract date of 7 days before
Select date(:ws-date1) - 7 Days into ws-date-test from sysibm.sysdummy1;
It not returning the date into the host variable. The ws-date-test contains the default value which is populated before the query.
Format of date in ws-date-test 'CCYY-MM-DD'
Do we need to do something else in EZT ?
Thanks,
-Kapil. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
1. How about a colon before ws-date-test?
2. How are ws-date1 and ws-date-test defined? |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Yup,
colon is present before all the host variables. That create problems at bind time. I am getting error at run time. It doesn't seem to be syntactical problem. There is no abend in my job.
Just the output is wrong.
All the date variables are defined as w 10 A.
I am doubtful abt ezt & db2 interface. The same query works fine in cobol.
Thanks,
-Kapil. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am doubtful abt ezt & db2 interface. |
Then you should open an issue with CA support. . . |
|
Back to top |
|
|
|