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

Linkedit COBOL with MQ Connection


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

New User


Joined: 25 Mar 2009
Posts: 78
Location: India

PostPosted: Wed Sep 05, 2012 9:41 pm
Reply with quote

Hi,

I was trying to linkedit a cobol program which open and put message into MQ. I have been trying to use the below JCL , but I am getting a message saying the variables MQPUT or MQCONN is not valid.

Code:
//LKED     EXEC PGM=IEWL,                                       
//         COND=(5,LT,COB),                                     
//         PARM='XREF,LIST,MAP,&MODE,SIZE=(2048K,256K)'         
//SYSLIB   DD   DISP=SHR,DSN=CEE.SCEELKED,DCB=BLKSIZE=32720     
//         DD   DISP=SHR,DSN=&LOADLIB.                         
//         DD   DISP=SHR,DSN=&LOADLB1.                         
//         DD   DISP=SHR,DSN=&LOADLB2.                         
//         DD   DISP=SHR,DSN=&LOADLB3.                         
//         DD   DISP=SHR,DSN=TCPIP.SEZATCP             *TCPIP   
//         DD   DISP=SHR,DSN=OEM.MQM.V6R0M0.SCSQLOAD.GISC   *MQ
//SYSLMOD  DD   DISP=SHR,DSN=&LOADLIB.(&MODULE.)               
//SYSUT1   DD   UNIT=DISK,SPACE=(CYL,(1,1))                     
//SYSPRINT DD   SYSOUT=*                                       
//SYSLIN  DD   DSN=&&LOADS&S.,DISP=(OLD,DELETE)                 
//        DD   DDNAME=SYSIN
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 05, 2012 9:50 pm
Reply with quote

Hello,

You need to post more relevant information.

What was shown by the compile (end of the listing)?

Has anyone ever successfully used MQ on your system?

You should NOT be trying to use self-created jcl. Your system has standard compile and link jcl you should use. If there is no standard for MQ compile/link, then you (or your manager) need(s) to work with the people who support the compiler and link editor to create standard jcl for this.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 05, 2012 10:09 pm
Reply with quote

you have probably missed putting the 'stubs' in the compile step.

as Dick said, your site has to generate the appropriate JCL for
compile/linkedit.

if you are also dealing with DB2 in the rununit,
you should be thinking of RRSAF,
which means a different type of mqsstub
as well as an appropriate set-up for the proper dsn... libraries.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 06, 2012 8:34 am
Reply with quote

all the info that you need about mqs is contained in the manuals
this link is to the WebSphere MQ Libraries
Pick your version and I suggest downloading all manuals
for future reference.

RRSAF info is contained in DB2 manuals as well as in
Vol 5 Chapter 3 of the ABC's of Systems Programming
Here is a list of all of the ABC's of Systems Programming (Redbooks)
suggested reading for anyone who desires to be aware of the Z/os environment.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


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

PostPosted: Thu Sep 06, 2012 9:19 am
Reply with quote

Probably your system has aliases for MQCONN and MQPUT so it fails

So as others said you need to check with people who knows the system well
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Sep 06, 2012 11:59 am
Reply with quote

Quote:
but I am getting a message saying the variables MQPUT or MQCONN is not valid.


it would have been nice if the TS had posted the REAL message instead of his interpretation...


IMO the message as worded does not relate to the linkage editor,
but until the TS clarifies we will never know
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Thu Sep 06, 2012 1:36 pm
Reply with quote

A linkedit for MQ uses linkedit controls cards to specify the 'stub' to be included in the linkedit. - the linkage editor/binder does not find the required module automatically. This is because the MQ calls in the program are to entry-points within the appropriate 'stub' module - CSQBSTUB, CSQQSTUB or CSQCSTUB .

Garry.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 06, 2012 4:18 pm
Reply with quote

Garry, When I was working at your place I did an MQ program and remember nothing of this because, I presume, it was all set up in ChangeMan. So I guess the TS should check to see if he is using the correct options in whatever source control app he is using (ChangeMan/Endevor/whatever). Here, down the road from you, we use Endevor but no MQ so I cannot look it up.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 06, 2012 5:28 pm
Reply with quote

Garry,
thx for the post and clearing-up a few misstatements icon_redface.gif
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Sep 06, 2012 5:37 pm
Reply with quote

Quote:
saying the variables MQPUT or MQCONN is not valid
This sounds more like a compile error than an link edit problem. But, as others have noted, without the actual message text it is hard to be certain of anything.
Back to top
View user's profile Send private message
ajeshrn

New User


Joined: 25 Mar 2009
Posts: 78
Location: India

PostPosted: Fri Sep 07, 2012 12:10 am
Reply with quote

Sorry for not putting the actual error message which I was getting.

I was trying to compile and link edit the program, and I was getting the below error yesterday while Linkedit

IEW2278I B352 INVOCATION PARAMETERS - XREF,LIST,MAP,RMODE=ANY,SIZE=(2048K,256K)
IEW2456E 9207 SYMBOL MQCONN UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
IEW2456E 9207 SYMBOL MQOPEN UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
IEW2456E 9207 SYMBOL MQPUT UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.

As Garry and dbzTHEdinosauer suggested, I tried including the Stubs and it worked. Thanks a lot!
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Fri Sep 07, 2012 1:57 pm
Reply with quote

Good to know you got it working.

Garry
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 07, 2012 3:03 pm
Reply with quote

I mentioned using stubbs.

Garry told you where to use them.

kudos go to Garry for his accurate (as always) comments.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


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

PostPosted: Fri Sep 07, 2012 3:58 pm
Reply with quote

Thanks Dick icon_biggrin.gif
Back to top
View user's profile Send private message
mlajbus

New User


Joined: 05 Aug 2005
Posts: 1
Location: mexico city

PostPosted: Thu Jan 08, 2015 3:22 am
Reply with quote

wrote:
you have to add as shown

I think the issue is only with link edit step. I see that the precompile
and compile steps gave 04 which is acceptable. The link edit is having 08
RC. When I was checking my link edit steps, I could see that there is a
line for CSQSTUB

//LINK EXEC PGM=IEWL,COND=(8,LT,PLI),PARM=(LIST,LET,XREF,MAP)
//CSQSTUB DD DSN=SYS1.MQM.SCSQLOAD,DISP=SHR

I also see that the MQ stub also also needs to be included with
SYSIN

//LINK.SYSIN DD *
INCLUDE CSQSTUB(CSQCSTUB)


The CSQCSTUB is for CICS programs. You will have to change to correct
CSQSTUB value based on the mode of your program.


WebSphere MQ for z/OS supplies the following stub programs:
CSQBSTUB
Stub program for z/OS batch programs
CSQBRRSI
Stub program for z/OS batch programs using RRS by way of the MQI
CSQBRSTB
Stub program for z/OS batch programs using RRS directly
CSQCSTUB
Stub program for CICS® programs
CSQQSTUB
Stub program for IMS™ programs
CSQXSTUB
Stub program for distributed queuing non-CICS exits
CSQASTUB
Stub program for data-conversion exits


www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q025760_.htm?lang=en

icon_biggrin.gif
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Jan 08, 2015 3:42 am
Reply with quote

ajeshrn left the building 2 years ago. icon_smile.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 Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top