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
 
Linkedit COBOL with MQ Connection

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Linkedit COBOL with MQ Connection
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

Site Director


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

PostPosted: Wed Sep 05, 2012 9:50 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Wed Sep 05, 2012 10:09 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Sep 06, 2012 8:34 am    Post subject:
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

Moderator


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

PostPosted: Thu Sep 06, 2012 9:19 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Thu Sep 06, 2012 11:59 am    Post subject: Reply to: Linkedit COBOL with MQ Connection
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

Active Member


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

PostPosted: Thu Sep 06, 2012 1:36 pm    Post subject:
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: 1868
Location: UK

PostPosted: Thu Sep 06, 2012 4:18 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Sep 06, 2012 5:28 pm    Post subject:
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: 657
Location: Whitby, ON, Canada

PostPosted: Thu Sep 06, 2012 5:37 pm    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Fri Sep 07, 2012 1:57 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Fri Sep 07, 2012 3:03 pm    Post subject:
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

Active Member


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

PostPosted: Fri Sep 07, 2012 3:58 pm    Post subject:
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    Post subject: update your jcl
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


http://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    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

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