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

Accessing MQ in CICS COBOL program


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Tue Jun 26, 2012 10:17 am
Reply with quote

Hi,

I am new to mq. I have written CICS COBOL as below. When I triggered the trans id , it through the error " MQOPEN * CC:00000012 * RC:00002085".

*
* Receive the parameter list passed in by CICS
*
MOVE SPACES TO W00-PARM-STRING.
MOVE LENGTH OF W00-PARM-STRING TO W00-PARM-LEN.
*
EXEC CICS IGNORE CONDITION LENGERR END-EXEC.
EXEC CICS RECEIVE
INTO( W00-PARM-STRING )
LENGTH( W00-PARM-LEN )
END-EXEC.

MOVE W00-PARM-STRING TO W00-MESSAGE.
PERFORM DISPLAY-MESSAGE.
*
* Move parameters into corresponding variables
*
UNSTRING W00-PARM-STRING
DELIMITED BY ALL ','
INTO W00-TRANSNAME
W00-NUMMSGS-NUM
W00-PADCHAR
W00-MSGLENGTH-NUM
W00-PERSISTENCE
W00-QNAME.
MOVE W00-MSGLENGTH-NUM TO W00-MSGLENGTH.
MOVE W00-NUMMSGS-NUM TO W00-NUMMSGS.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 26, 2012 10:28 am
Reply with quote

The Code 2085 is something like object not found

Is your Queue existing?
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Tue Jun 26, 2012 10:44 am
Reply with quote

Yes, its available.

Queue name

PARSE.XML.REQ1
PARSE.XML.RSP1

Qmgr : CSQ1
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Tue Jun 26, 2012 10:45 am
Reply with quote

Please tell me about this EXEC CICS RECEIVE command in this program.
Is it getting MQ names. I am getting Blank Queue name.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 26, 2012 10:46 am
Reply with quote

Queues might be available yet are you passing the right parameters before MQ operations?

Try a couple of display statements and check
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Tue Jun 26, 2012 11:28 am
Reply with quote

Do we need to map the MQ CICS program with MQ queue?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 26, 2012 12:58 pm
Reply with quote

I am trying to understand

Why do you need a RECEIVE??

Are you trying to fetch the Queue name from a MAP??
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Tue Jun 26, 2012 1:09 pm
Reply with quote

Hi,
I have hardcoded the Queue name in MQOD-OBJECTNAME. And tried to run. I am getting error 2035 as " * MQOPEN * CC : 00000002 * RC : 000002035 " . Please help me sought this problem.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 26, 2012 1:15 pm
Reply with quote

Now you have got a different error

2035 means you dont have access to queues

Talk to MQ admin for access
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1205
Location: Dublin, Ireland

PostPosted: Tue Jun 26, 2012 7:11 pm
Reply with quote

Pandora-Box wrote:
I am trying to understand

Why do you need a RECEIVE??

Are you trying to fetch the Queue name from a MAP??


I think the TS may want to RETRIEVE the trigger data, not RECEIVE from a map... ??

Garry.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 26, 2012 7:33 pm
Reply with quote

Also As Garry pointed if you wanted to RETRIEVE the trigger data

Also

I suggest you to look into sample code available

Code:
hlq.SCSQCOBS


There are sample programs

Or Are you trying to trigger a program after a message is placed ??
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Wed Jun 27, 2012 11:19 am
Reply with quote

Hi,

Now, i have changed the program with "hard coded" Queue name. Still , i am getting 2035 error. I have cross checked with Admin. They provided me the access. Please help me on parameters while creating the MQ queue.

Admin has created the Queue & trans id and mapped with my program. I am trying to trigger teh trans id at CICS. If anything missed out , please let me know.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 27, 2012 11:45 am
Reply with quote

Are you trying to trigger after placing the message?

Are you trying to create a queue?

Is your transaction & program having access to queue ?

Also do you have the Queue monitor being setup ?
Back to top
View user's profile Send private message
Thamilselvi

New User


Joined: 22 Jun 2012
Posts: 57
Location: Chennai

PostPosted: Wed Jun 27, 2012 11:54 am
Reply with quote

Now its working fine. The message has been placed in MQ.


Admin team solved this authorization problem


Thanks for all your help. icon_biggrin.gif
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts COBOL sorting, with input GDG base COBOL Programming 7
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts Associating a USERID with a CICS-Libe... CICS 0
No new posts omegamon for cics -UNSUPPORTED ENVIRO... CICS 2
No new posts Help needed in automation cics transa... CLIST & REXX 1
Search our Forums:

Back to Top