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
 

 

Date fetch is different for different load module

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Guest







PostPosted: Sat Nov 20, 2010 2:30 pm    Post subject: Date fetch is different for different load module
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Nov 22, 2010 6:50 am    Post subject:
Reply with quote

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:
http://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
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Nov 23, 2010 9:18 am    Post subject:
Reply with quote

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
View user's profile Send private message
Guest







PostPosted: Tue Nov 23, 2010 2:08 pm    Post subject: Reply to: Date fetch is different for different load module
Reply with quote

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







PostPosted: Tue Nov 23, 2010 2:11 pm    Post subject: Reply to: Date fetch is different for different load module
Reply with quote

Thanks Dick .... The document which you referred had the info.

Really it was very useful.
Back to top
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 23, 2010 9:47 pm    Post subject: Reply to: Date fetch is different for different load module
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 -> DB2 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 Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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