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
 

 

Initialize a Time stamp with Not Null declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 72
Location: india

PostPosted: Tue Sep 18, 2012 1:06 pm    Post subject: Initialize a Time stamp with Not Null declaration
Reply with quote

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
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Sep 18, 2012 1:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Tue Sep 18, 2012 1:58 pm    Post subject: Reply to: Initialize a Time stamp with Not Null declaration
Reply with quote

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
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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