View previous topic :: View next topic
|
Author |
Message |
Prem Prakash
New User
Joined: 07 Jan 2006 Posts: 6 Location: India
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Prem Prakash,
Would u provide the code |
|
Back to top |
|
|
Prem Prakash
New User
Joined: 07 Jan 2006 Posts: 6 Location: India
|
|
|
|
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 |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
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 |
|
|
|