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
 

 

Accessing MQ in CICS COBOL program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Accessing MQ in CICS COBOL program
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

Moderator


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

PostPosted: Tue Jun 26, 2012 10:28 am    Post subject:
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    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Tue Jun 26, 2012 10:46 am    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Tue Jun 26, 2012 12:58 pm    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Tue Jun 26, 2012 1:15 pm    Post subject:
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

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Jun 26, 2012 7:11 pm    Post subject:
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

Moderator


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

PostPosted: Tue Jun 26, 2012 7:33 pm    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Wed Jun 27, 2012 11:45 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm


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