View previous topic :: View next topic
|
Author |
Message |
Guest
|
|
|
|
Hi,
I have a Cobol-Db2 program, which does fetch from DB.
I compile program with my compile JCL with bind parameters and load module is stored in my PDS.
Same program is staged into Endevor, and Endevor does Bind and creates load module.
Bind parameters of both are same.
But when run the program, Date if fetched differently in by two load modules:
1) With My PDS load module
Date is fetched like : 2010-11-20
2) With Endevor loadlib :
Date is fetched like : 11/20/2010
But in database date is declared as CHAR(10), and stored as CCYY-MM-DD.
So my load module picks date as it is from database but Endevor loadlib is changing the format.
Not sure how date is getting converted to mm/dd/ccyy on fetch in Endevor load module. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Suggest you work with your dba to make sure that everything is actually consistent. . . And that ALTDATE has not come into play.
You might also see if this has anything to do with your issue:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqj10/2.24.6
If you are not using the system standard compile jcl for "your" compile, this is quite possibly the problem. Only the system standard compile/bind jcl should be used. You should not use "your own". |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Vikaspo,
Quote: |
I compile program with my compile JCL with bind parameters and load module is stored in my PDS.
Same program is staged into Endevor, and Endevor does Bind and creates load module.
1) With My PDS load module
Date is fetched like : 2010-11-20
2) With Endevor loadlib :
Date is fetched like : 11/20/2010
|
Interesting....
Quote: |
But in database date is declared as CHAR(10), and stored as CCYY-MM-DD.
|
Since its stored as CHAR(10), it can be any 10 characters. So, you will be fetching it exactly the same way you stored it.
I hope you know there is a DATE data type.
Thanks,
Sushanth |
|
Back to top |
|
|
Guest
|
|
|
|
Thanks to all for your replies. Issue is resolved now.
The problem was with pre-compiler option.
My compile was taking DATE(ISO) as option , hence data was coming as 2010-11-22.
Endevor compiler was taking DATE(USA) as option hence date format of 11/22/2010.
No changed code to take MM/DD/CCYY as format, its working. |
|
Back to top |
|
|
Guest
|
|
|
|
Thanks Dick .... The document which you referred had the info.
Really it was very useful. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|