IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-927 sqlcode


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venu_dr

New User


Joined: 06 Jul 2006
Posts: 6

PostPosted: Fri Dec 07, 2007 12:01 pm
Reply with quote

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

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Fri Dec 07, 2007 12:52 pm
Reply with quote

Hi Venu,
Use NODYNAM option in compilation, if you are currently using DYNAM.
Back to top
View user's profile Send private message
venu_dr

New User


Joined: 06 Jul 2006
Posts: 6

PostPosted: Fri Dec 07, 2007 2:33 pm
Reply with quote

Hi

Thanks for u r reply.

I am getting the same SQLCODE after compiling the program with NODYNAM option.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Dec 07, 2007 3:00 pm
Reply with quote

Look up the -927 sqlcode explanation. you will find that it has nothing to do with your sql.
Back to top
View user's profile Send private message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 37
Location: Chennai

PostPosted: Sat Dec 08, 2007 12:15 am
Reply with quote

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

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Dec 08, 2007 12:30 am
Reply with quote

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

New User


Joined: 14 Jul 2005
Posts: 44
Location: US

PostPosted: Sat Dec 08, 2007 4:26 am
Reply with quote

Craq is right.

Check your link edit listing and run-time JCL.

Make sure you use the correct DB2 attachment stub.
Back to top
View user's profile Send private message
frudo

New User


Joined: 16 Aug 2005
Posts: 5

PostPosted: Tue Dec 11, 2007 10:36 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts SQLCODE=-204 SQLSTATE=42704 DB2 4
No new posts Getting sqlcode 805 while executing R... DB2 10
Search our Forums:

Back to Top