View previous topic :: View next topic
|
Author |
Message |
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
34) What is the COBOL picture clause of the following DB2 data types:
DATE, TIME, TIMESTAMP?
DATE: PIC X(10)
TIME : PIC X(08)
TIMESTAMP: PIC X(26)
33) What is the physical storage length of each of the following DB2 data types:
DATE, TIME, TIMESTAMP?
DATE: 4bytes
TIME: 3bytes
TIMESTAMP: 10bytes
Can anyone pls explain me how the allocation for DATE,TIME and Time stamp is 4,3 and 10 bytes respectively.
Thanks, |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
physical storage length |
refers to the space required in the db2 table as it is maintained on DASD.
the cobol pic clauses refer to 'application (in this case cobol program) storage useage'
or
how the data is presented to an application via (e.g.) sql select |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the fastest way to get a mapping of the DB2 data types to the various languages is to define a table and run a dclgen for it .
it will generate data structures with the correct definition; fast, effective, the definitions will be ERROR FREE
in case of issues with the generated definition You could always open a PMR with IBM |
|
Back to top |
|
|
Mukesh Pandey
Active User
Joined: 11 Nov 2008 Posts: 143 Location: India
|
|
|
|
Thank you. |
|
Back to top |
|
|
|