|
View previous topic :: View next topic
|
| Author |
Message |
maxsubrat
Active User
Joined: 27 Feb 2008 Posts: 110 Location: india
|
|
|
|
Hi, I want a clarification. If I declare a Time stamp with Not Null in the DCLGEN table,
Then If I initialize that TS, what default value will get ?
EXEC SQL DECLARE EAD.EMPLOYEE TABLE
************************************************
* COBOL DECLARATION FOR TABLE WCDA.WCDAAUDT
************************************************
01 DCLEMPLOYEE.
10 CHTS PIC X(26).
INITIALIZE DCLEMPLOYEE.
what value CHTS will get ?
Is it current TS?
Thanks
max |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Why not give it a try your own?
You're not using INITIALIZE statement with REPLACING phrase and CHTS is defined as alphanumeric -- so as the definition goes, SPACE is the implied sending field for alphabetic, alphanumeric,national, alphanumeric-edited, and DBCS items. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I'd just add to what Anuj has said... "how could it possibly be a timestamp!"
If, through some sort of magic, the compiler could realise that the field could conveniently hold a timestamp (26 bytes long) and that from something in the data-name the intention of the human was for it to actually hold a timestamp - how would it know what you wanted it to be INITIALIZEd to? A timestamp format with zero values (so, midnight)? The "current" timestamp (so it would magically have to extract from DB2?)?
Please think before posting. It'll save you so some brickbats. |
|
| Back to top |
|
 |
|
|