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

Sql code: -922,MQ series


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

New User


Joined: 07 Jan 2006
Posts: 6
Location: India

PostPosted: Mon Apr 10, 2006 3:34 pm
Reply with quote

Hi all,
I am creating a driver module for communication between fron end(VB) and Backend(Mainframe) using MQ series. i am new to MQ series. i am getting the data from front end in the input queue and storing those data in some temporary variables. uptill, its fine but when i am trying to insert those data in a table,its giving sql error -922. although, the table creator has given me all the acess on tables and also granted me bind and execute access on plan. Please help me out. Thanks.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Apr 10, 2006 6:11 pm
Reply with quote

Hi Prem Prakash,

Would u provide the code
Back to top
View user's profile Send private message
Prem Prakash

New User


Joined: 07 Jan 2006
Posts: 6
Location: India

PostPosted: Tue Apr 11, 2006 11:59 am
Reply with quote

Hi Ekta,
I am pasting below the code snippet where i am facing this problem:

****Getting the message from Input queue**********

CALL 'MQGET' USING W03-HCONN
W03-HOBJ-CHECKQ
MQMD
MQGMO
W03-BUFFLEN
W03-MSG-DATA
W03-DATALEN
W03-COMPCODE
W03-REASON.
*
IF (W03-COMPCODE NOT = MQCC-OK) OR
(W03-REASON = MQRC-NO-MSG-AVAILABLE)
MOVE 'MQGET*' TO M02-OPERATION
MOVE MQOD-OBJECTNAME TO M02-OBJECTNAME
PERFORM RECORD-CALL-ERROR
GO TO A-MAIN-EXIT
END-IF.
****Moving msgdata to working storage variable ******
MOVE W03-MSG-DATA TO W03-MAN1TEST-MSG

EXEC CICS WRITEQ TS
QUEUE('CSQ4SAMP')
FROM (W03-MAN1TEST-MSG)
LENGTH(W05-TS-MESSAGE-LENGTH)
END-EXEC.
******Moving the data into dclgen variables of table

MOVE W03-MAN1TEST-MSG TO ASPC-MSG
MOVE W03-MAN1TEST-MSG-REPLY TO ASPC-REPLY

******Inserting into table*************
****(Here i am getting SQL error -922)****

EXEC SQL
INSERT INTO g56715.DM_AISPOC_TBL
VALUES(:ASPC-MSG,:ASPC-REPLY)
END-EXEC
PERFORM SQLERROR-HANDLE-PARA.


Hope this code snippet is sufficient enough for you to get the reason of error. Thanks.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 11, 2006 3:23 pm
Reply with quote

hy Prem Prakash,

your program is a cics program.
which transaction you need to run your program?
if trx is XYZ then you have a transaction entry in cics.
check: cemt i tran(XYZ)
if it is so, then note:
you also need a db2tran entry in cics and a db2entry entry,
which points to the db2 plan, thru which you can access the
data.
check: cemt i db2tran(XYZ), cemt i db2entry(XYZ)

i hope this will help you...

martin9
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top