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
 

 

-927 sqlcode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: -927 sqlcode
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    Post subject:
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    Post subject: Reply to: -927 sqlcode
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: 6967
Location: porcelain throne

PostPosted: Fri Dec 07, 2007 3:00 pm    Post subject:
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: 36
Location: Chennai

PostPosted: Sat Dec 08, 2007 12:15 am    Post subject: Reply to: -927 sqlcode
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    Post subject: Re: Reply to: -927 sqlcode
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    Post subject: Reply to: -927 sqlcode
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    Post subject: Reply to: -927 sqlcode
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    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
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need to understand SQLCODE = 12 rohanthengal DB2 3 Thu Nov 05, 2015 11:22 am
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am


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