Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sql code: -922,MQ series

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Sql code: -922,MQ series
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: 1187
Location: Bangalore,India

PostPosted: Mon Apr 10, 2006 6:11 pm    Post subject:
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    Post subject:
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    Post subject:
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    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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us