View previous topic :: View next topic
|
Author |
Message |
venu_dr
New User
Joined: 06 Jul 2006 Posts: 6
|
|
|
|
Hi,
I am getting the -927 sqlcode for the below sql statement. Can anybody help me to resolve this problem.
01 WS-DB2-TIMESTAMP PIC X(26) VALUE SPACES.
EXEC SQL
SET :WS-DB2-TIMESTAMP = CURRENT TIMESTAMP
END-EXEC
Thanks
Venu |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Hi Venu,
Use NODYNAM option in compilation, if you are currently using DYNAM. |
|
Back to top |
|
|
venu_dr
New User
Joined: 06 Jul 2006 Posts: 6
|
|
|
|
Hi
Thanks for u r reply.
I am getting the same SQLCODE after compiling the program with NODYNAM option. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Look up the -927 sqlcode explanation. you will find that it has nothing to do with your sql. |
|
Back to top |
|
|
Krishnadeva Reddy
New User
Joined: 14 Nov 2007 Posts: 37 Location: Chennai
|
|
|
|
Hi,
When I see your SQL I guess you want CURRENT TIMESTAMP should be moved to your working storage variable or host variable.Am I right?
If so then try this way,
You get the CURRENT TIMESTAMP into host variable.
EXEC SQL
SELECT CURRENT TIMESTAMP
INTO :WS-DB2-TIMESTAMP
FROM SYSIBM.SYSDUMMY.
END-EXEC |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Krishnadeva Reddy wrote: |
Hi,
When I see your SQL I guess you want CURRENT TIMESTAMP should be moved to your working storage variable or host variable.Am I right?
If so then try this way,
You get the CURRENT TIMESTAMP into host variable.
EXEC SQL
SELECT CURRENT TIMESTAMP
INTO :WS-DB2-TIMESTAMP
FROM SYSIBM.SYSDUMMY.
END-EXEC |
Krishnadeva,
There is nothing wrong with OP's SQL. More than likely the JCL being used to execute the program is incorrect. |
|
Back to top |
|
|
anv2005
New User
Joined: 14 Jul 2005 Posts: 44 Location: US
|
|
|
|
Craq is right.
Check your link edit listing and run-time JCL.
Make sure you use the correct DB2 attachment stub. |
|
Back to top |
|
|
frudo
New User
Joined: 16 Aug 2005 Posts: 5
|
|
|
|
Is your program a pure Db2 program or is it an IMS-DB2 program. If it has IMS then you will need to include the linkage control card in your development package. |
|
Back to top |
|
|
|