View previous topic :: View next topic
|
Author |
Message |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
Hi All,
I'm updating few values from cics screen to db2 table one of which being updated is current_timestamp.
Code: |
exec sql
insert into db2table
(cust_id,time) values (001,current timestamp):
end-exec
|
after insertying the values in the db2 table apparaently i have to populate into the cics screen the inserted time stamp that have been saved in db2 table. for that i have to take the current_timestamp that i have updated in table Only.How can i take the timestamp above into working storage variable and populate into the screen???? should i write another query with priomary key or is there any other way to do the same.
Please suggest frens.... |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
After insert select the data and pass it |
|
Back to top |
|
|
Dhrubojoty mukherjee
New User
Joined: 23 Mar 2010 Posts: 14 Location: kolkata
|
|
|
|
In your program select the data and take it into the host variable.Then move the data to the out-variable of the cics map... |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
first of all : a TS column called "time" is a very bad idea
second : select the current timestamp while inserting :
Code: |
SELECT TScol
FROM FINAL TABLE (insert into db2table
(cust_id,tscol) values (001,current timestamp)); |
|
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
GuyC wrote: |
first of all : a TS column called "time" is a very bad idea
second : select the current timestamp while inserting :
Code: |
SELECT TScol
FROM FINAL TABLE (insert into db2table
(cust_id,tscol) values (001,current timestamp)); |
|
Hi GuyC,
I have taken as Current Timestamp only....Could you please have a look suggest for the solution. Thanks in Advance.The below query i have written
Code: |
exec sql
insert into db2table
(cust_id,time) values (001,current timestamp):
end-exec
|
|
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
Back to top |
|
|
|