MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Date format in SPUFI and in program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Sat Aug 23, 2003 5:01 am    Post subject: Date format in SPUFI and in program Reply with quote

Hi,

When doing a SELCCT on a table, the date is returned in format MM/DD/YYYY. But when executing the same query using a Cobol program, the date is returned in the form YYYY-MM-DD.
Why this difference ? Is there any way by which my program can also get the date in the MM/DD/YYYY format ?

Regards
Ranjish
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Sat Aug 23, 2003 9:53 am    Post subject: Reply with quote

ranjish,

Is the program and spufi pointing to the same table and region?? how is the column defined in the db2 table?

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Tue Aug 26, 2003 9:50 am    Post subject: Reply with quote

Kolusu,

The program and the SPUFI are accessing same DB2 region. The column is defined as DATE field in the table.

Thanks
Ranjish
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue Aug 26, 2003 10:30 am    Post subject: Reply with quote

Ranjish,

It seems that your SPUFI is defaulted to USAdate format ( mm/dd/yyyy) and your pre-compiler option is set to ISO date format( yyyy-mm-dd).check the compiler listing of the program.These are set up on the Application programming defaults panel 2: DSNTIP4.The values you specify on this panel are used as default values by the program preparation panels, the program preparation CLIST (DSNH), and the precompiler. They can also be used as defaults by other programs, such as Query Management Facility (QMF).

check this link for
Application programming defaults panel 2: DSNTIP4

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group