View previous topic :: View next topic |
Author |
Message |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Fri May 11, 2007 4:54 am Post subject: MQOPEN and MQCONN in CICS |
|
|
Hi,
I'm trying to connect MQ from CICS. In my CICS Program I'm starting with an MQOPEN (i think we dont need an MQCONN in CICS). But in the MQOPEN
Code: |
CALL 'MQOPEN' USING CON-HANDLE,
MQM-OBJECT-DESCRIPTOR,
MQOO-OUTPUT,
OPN-CON-HANDLE,
OPN-COMP-CODE,
OPN-REASON-CODE.
|
What should be the value in CON-HANDLE. In case of batch when we do a MQCONN, we get the handle. But here since we are not doing a MQCONN, from where will this fetch the CON-HANDLE ?
Any thoughts ?
Deepesh |
|
Back to top |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Fri May 11, 2007 10:28 am Post subject: |
|
|
From the Application Programming Guide:
As input to the MQOPEN call, you must supply:
v A connection handle. For CICS applications on z/OS, you can specify the constant MQHC_DEF_HCONN (which has the value zero), or use the connection handle returned by the MQCONN or MQCONNX call. For other programs, always use the connection handle returned by the MQCONN or MQCONNX call.
v A description of the object that you want to open, using the object descriptor structure (MQOD).
v One or more options that control the action of the call.
The output from MQOPEN is:
v An object handle that represents your access to the object. Use this on input to any subsequent MQI calls.
v A modified object-descriptor structure, if you are creating a dynamic queue (and it is supported on your platform).
v A completion code.
v A reason code. |
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Tue May 15, 2007 7:22 am Post subject: |
|
|
CICS Guy,
I tried with MQHC_DEF_HCONN. This is how I went about
-- I'm checking for EIBCALEN = 0, i.e. first time and then I'm having an MQOPEN.
-- Before the MQOPEN Call, i moved the Local Queue name to MQOD-OBJECTNAME and the Q Mgr name to MQOD-OBJECTQMGRNAME.
-- Then I did an MQOPEN i gave MQHC_DEF_HCONN(default value zero).
-- Its then giving me a status code of 2018.
The Q'Mgr is connected as I can see the Status Connected in CKQC. Also the listener is up and running.
I did also try with moving SPACES to Qmgr name MQOD-OBJECTQMGRNAME before MQOPEN, but still the same error.
Any ideas ??
Thanks,
Deepesh |
|
Back to top |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Tue May 15, 2007 7:44 am Post subject: Re: MQOPEN and MQCONN in CICS |
|
|
deepeshk79 wrote: | Code: |
CALL 'MQOPEN' USING CON-HANDLE,
MQM-OBJECT-DESCRIPTOR,
MQOO-OUTPUT,
OPN-CON-HANDLE,
OPN-COMP-CODE,
OPN-REASON-CODE.
|
| Is your MQOO-OUTPUT the options?
Well, If you put MQHC_DEF_HCONN in your CON-HANDLE, it should be working. |
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Tue May 15, 2007 8:38 am Post subject: |
|
|
yes MQOO-OUTPUT is the option, not sure why this is not working !! |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue May 15, 2007 10:29 am Post subject: |
|
|
why have you not tried an MQCONN???
I imagine (don't know) that when you are in CICS, the reason that the MQCONN in not necessary, is because the appropriate CICS table has been parameterized properly.
also, are you comp/link with the correct stubs?
did you by chance look up msg 2018? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Tue May 15, 2007 11:17 am Post subject: |
|
|
Yes, he did say he got a 2018, but he also said that CKQC showed ok, I assume he saw "connected"..... |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue May 15, 2007 11:46 am Post subject: |
|
|
Quote: |
The Q'Mgr is connected as I can see the Status Connected in CKQC. Also the listener is up and running.
|
Deepesh, CKCQ only tells you if MQS is running in cics in a status whereby a proper connect/open can be effected.
you are getting a 2018 on an open. Essentially that means you are not providing a proper conn-handle.
again:
- cics is not set up to allow for auto-conn with open
- stubs are incorrect.
- you moved zero or '0' to MQHC_DEF_HCONN, which is an 8 char x type field, which means it looked like this:
(zero with 7 spaces).
_________________ Dick Brenholtz
American living in Varel, Germany
Last edited by dbzTHEdinosauer on Tue May 15, 2007 12:19 pm; edited 1 time in total |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue May 15, 2007 12:19 pm Post subject: |
|
|
Deepesh,
Did you do the CKCQ display during your task? I think not, otherwise you would not have received a 2018. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Wed May 16, 2007 12:55 am Post subject: |
|
|
Dick and CICSguy,
Based on your suggestions, I tried the MQCONN in my program. The below is the code
Code: |
IF EIBCALEN = 0
MOVE LOW-VALUES TO MPEMPLYO
MOVE SPACES TO WS-COMMAREA
PERFORM MQ-CONNECT-PARA
|
Code: |
MQ-CONNECT-PARA.
CALL 'MQCONN' USING CON-QM-NAME,
CON-HANDLE,
CON-COMP-CODE,
CON-REASON-CODE.
|
The variable declarations are as below
Code: |
01 CON-QM-NAME PIC X(04) VALUE 'CSQ6'.
01 CON-HANDLE PIC S9(9) BINARY.
01 CON-COMP-CODE PIC S9(9) BINARY.
01 CON-REASON-CODE PIC S9(9) BINARY.
|
Now when i execute my transaction XYZ1, I'm getting the below error
Code: |
DFHAC2206 00:43:16 CICSTS31 Transaction XYZ1 failed with abend ASRA. Updates
to local recoverable resources backed out.
|
I have verified the below details
CKQC has the status CONNECTED (when I do a display)
Channel Initiator is up and running for port 1414.
Code: |
CSQM132I %CSQ6 CSQMSCHI CHANNEL INITIATOR ALREADY ACTIVE
|
Listener at port 1414 is already running
[code:1:35771ddfa0]
CSQX017I %CSQ6 CSQXSTRL Listener already started, port 1414 address *,
|
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Wed May 16, 2007 12:56 am Post subject: |
|
|
Dick and CICSguy,
Based on your suggestions, I tried the MQCONN in my program. The below is the code
Code: |
IF EIBCALEN = 0
MOVE LOW-VALUES TO MPEMPLYO
MOVE SPACES TO WS-COMMAREA
PERFORM MQ-CONNECT-PARA
|
Code: |
MQ-CONNECT-PARA.
CALL 'MQCONN' USING CON-QM-NAME,
CON-HANDLE,
CON-COMP-CODE,
CON-REASON-CODE.
|
The variable declarations are as below
Code: |
01 CON-QM-NAME PIC X(04) VALUE 'CSQ6'.
01 CON-HANDLE PIC S9(9) BINARY.
01 CON-COMP-CODE PIC S9(9) BINARY.
01 CON-REASON-CODE PIC S9(9) BINARY.
|
Now when i execute my transaction XYZ1, I'm getting the below error
Code: |
DFHAC2206 00:43:16 CICSTS31 Transaction XYZ1 failed with abend ASRA. Updates
to local recoverable resources backed out.
|
I have verified the below details
CKQC has the status CONNECTED (when I do a display)
Channel Initiator is up and running for port 1414.
Code: |
CSQM132I %CSQ6 CSQMSCHI CHANNEL INITIATOR ALREADY ACTIVE
|
Listener at port 1414 is already running
[code:1:ce31da3d02]
CSQX017I %CSQ6 CSQXSTRL Listener already started, port 1414 address *,
|
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Wed May 16, 2007 1:27 am Post subject: |
|
|
With the help of the Administrator i got the below info about the ASRA abend I'm facing
Code: |
DFHME0116 CICSTS31 136
(Module:DFHMEME) CICS symptom string for message DFHAP0001 is
PIDS/5655M1500 LVLS/640 MS/DFHAP0001 RIDS/DFHSRP PTFS/UK05645
AB/S00C4 AB/UAKEA RIDS/CICSFRMQ ADRS/00004500
|
Code: |
CICSTS31 CSQCQCON CONNECT received from TERMID=0014 TRANID=CKCN USERID=CICSUSER
CICSTS31 CSQCCON Duplicate connect to queue manager CSQ6. Connect rejected
|
Code: |
An abend (code 0C4/AKEA) has occurred at offset X'00004500' in module CICSFRMQ
|
Does it mean CICS is already connected to MQ Mgr CSQ6 ??
Thanks,
Deepesh |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed May 16, 2007 1:46 am Post subject: |
|
|
Deepesh,
yes, the connection is already there, the open should work.
what mq stubs are you using during compilation/link?
only other thing i can suggest is that I have always used a 48 char x type field to contain object names. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed May 16, 2007 2:25 am Post subject: |
|
|
Quote: |
you moved zero or '0' to MQHC_DEF_HCONN, which is an 8 char x type field, which means it looked like this:
|
that was rather stupid on my part. handles are always s9(9) binary. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu May 17, 2007 3:37 pm Post subject: |
|
|
CSQCSTUB for CICS _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|