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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm


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