View previous topic :: View next topic |
Author |
Message |
Ranjish Beginner

Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Sat Aug 23, 2003 5:01 am Post subject: Date format in SPUFI and in program |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Sat Aug 23, 2003 9:53 am Post subject: |
|
|
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 |
|
 |
Ranjish Beginner

Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
|
Posted: Tue Aug 26, 2003 9:50 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Tue Aug 26, 2003 10:30 am Post subject: |
|
|
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 |
|
 |
|
|