Author |
Message
|
monkey |
Posted: Fri Oct 13, 2006 12:56 am Post subject: Put a test message onto a Queue on Z/OS |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
I need to test a queue I have set up from a Z/OS system to a Solaris system.
The channel is up and running, and I can use amqsget on the solaris end to get the test message, the problem is I don't know how to put a test message onto the QR on the Z/OS end.
I do seems to have access to CSQ4BVK1 which seems to be a sample program for putting a message, unfortunately I can't seem to get it to work?
Can anyone give me some example syntax to use?
Thanks |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Oct 13, 2006 3:04 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
A sample is provided in the SYSQPROC(CSQ4BVJR) member _________________ Regards, Butcher |
|
Back to top |
|
 |
monkey |
Posted: Fri Oct 13, 2006 6:25 am Post subject: So how do I use it? |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
Thanks, but like I said, I have access to a sample program but I don't know how to use it. (This is the first time I've had to use Z/OS!)
Do you have an example of the syntax you would use to put onto a remote queue? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 6:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you read the Application Programming Guide? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
monkey |
Posted: Fri Oct 13, 2006 6:38 am Post subject: you are taking the pi55 aren't you? |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
jefflowrey wrote: |
Did you read the Application Programming Guide? |
There's no need to be obtuse, I have searched far and wide and have not found any exmples of how to put a test message onto a remote queue on z/os.
If you don't have any more useful advise - don't post! There simply no need to be faesecious. |
|
Back to top |
|
 |
monkey |
Posted: Fri Oct 13, 2006 6:44 am Post subject: I'm not a programmer |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
So how would the application programming guide help me?
It tells you about the API and how to make calls from a program. Seeing as I'm not writing a program - it is of absolutely no use whatsoever in this instance.
If you have a reference which answers my original question then post it. Otherwise, why bother to comment?!
It's a shame people find the need to attampt to ridicule others in a forum such as this. Mostly people are exceptionally helpful and clearly take pride in imparting their knowledge to those who need the help. That's what makes this forum great.
Unfortunately some people let the side down....... |
|
Back to top |
|
 |
monkey |
Posted: Fri Oct 13, 2006 6:53 am Post subject: OK so maybe I went over the top.... |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
....but of course I've bloomin read the info on the sample programs! I wouldn't be asking the question if I hadn't read it!
It's not good to assume that people are using you as the first port of call without researching for themselves.
But I apologise, I assume it's happened a lot to you in the past - suffice to say, I do my own research and I tend to turn to this forum as a last resort (when I have admitted defeat!)
The problem is it doesn't actually make any sense to me.
I have access to a TSO session in which I can call "CSQ4BVK1"
But there don't seem to be any instructions on how to use it.
I understand I can type:
CSQ4BVK1,qmanagerName,queueName
But how do I actually give it some text for a message??
hmmmm, this must e something obvious that I'm missing. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 13, 2006 7:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, it's just that the APG has a specific section on the zOS sample programs. It seems you've read this, but one can never tell really.
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/sappls.htm
And the rest of your question is probably "How do I run *any* z/OS program", or "How do I supply input to any z/OS program?".
For TSO, I think input usually comes from the terminal (i.e., the user). For batch, my understanding is that input usually comes from a fileset that is referenced in the JCL that runs the job. For CICS, well... somewhere else.
But I'm not a mainframe person, and I wouldn't even personally *attempt* this without a competent mainframe person sitting next to me.
On the third hand, maybe the mainframe has the Client Attachment Facility, and you can submit your message from a distributed machine using a client program. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Oct 13, 2006 7:12 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
the SYSQPROC(CSQ4BVJR) member (i posted above) is the sample jcl to run the program. it shows you how to use it !!!!!!!
you should get a z/Os collegue to show you some things. when this is your first time on z/OS there is lots you need to know to get this program started.
the sample may need compiling. jcl syntax. submit (jobclasses), how to check the output, where to get coffee, ......
take the sample jcl and the location of the source sample (SCSQCOBS) and ask your z/Os to compile it and to run it with the queue and queuemanager you provide. _________________ Regards, Butcher |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 13, 2006 7:31 am Post subject: Re: OK so maybe I went over the top.... |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
monkey wrote: |
....hmmmm, this must e something obvious that I'm missing. |
Knowledge of JCL perhaps?
If it's your first time on Z/OS there's a lot to consider. It's very different to distributed platforms. Check out the section jefflowrey has suggested and seek the assistance of a competant Z/OS person. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
monkey |
Posted: Fri Oct 13, 2006 8:57 am Post subject: Re: OK so maybe I went over the top.... |
|
|
 Novice
Joined: 15 Feb 2006 Posts: 24 Location: London
|
Vitor wrote: |
Knowledge of JCL perhaps?
If it's your first time on Z/OS there's a lot to consider. It's very different to distributed platforms. Check out the section jefflowrey has suggested and seek the assistance of a competant Z/OS person. |
Unfortunately it's 6 years since I did COBOL programming, used CICS, wrote JCL and wrote menu screens. It's a time I have blanked from my memory - I don't remember ANY of it!
Sadly it's pretty much impossible to get any support from the Z/OS team so there is nobody there to ask.
I can actually run the command I mentioned - and specifying the queue and the queue manager seems to "complete successfully", but no messages appear anywhere and it never asks me to input the actual text of the message.
I'll try the SYSQPROC(CSQ4BVJR) command Mr Butcher mentions, if I can figure out how to use it, as the programming guide doesn't mention it.
Thanks guys for your help.
If anyone can post a simple example of the syntax to type into my tso command line that would be fantastic. (otherwise I'll be restricted to only ever being able to just define objects but not test them on Z/OS:-( ) |
|
Back to top |
|
 |
LuisFer |
Posted: Fri Oct 13, 2006 10:41 am Post subject: Re: OK so maybe I went over the top.... |
|
|
 Partisan
Joined: 17 Aug 2002 Posts: 302
|
Too, you can use the amqsputc sample to connect/open/put a msg to z/OS QMgr, if the CAF (Client Att. Feature) FMID is installed. |
|
Back to top |
|
 |
zpat |
Posted: Fri Oct 13, 2006 11:39 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If you have client connection, there any many options. Support pack IH03 (RFHUTILC) is excellent. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Oct 14, 2006 7:58 am Post subject: |
|
|
Guest
|
Sample JCL supplied with MQ for z/OS includes documentation on how to use the sample JCL. You will need to determine the real dataset names for your installation, create a valid JOB statement, submit the job, look at the output via SDSF (or similar tool), etc.
//CSQ4BVK1 JOB ...
//* PROGRAM CSQ4BVK1 ISSUES MQPUT ON A QUEUE.
//* - FIRST PARM (++QMGR++) QUEUE MANAGER NAME
//* - SECOND PARM (++QUEUE++) QUEUE NAME
//* - THIRD PARM (++MSGS++) THE NUMBER OF MESSAGES TO PUT-(9999)
//* - FOURTH PARM (++PAD++) THE PADDING CHARACTER
//* - FIFTH PARM (++LEN++) THE LENGTH OF EACH MESSAGE-(9999)
//* - SIXTH PARM (++PERS++) (P)ERSISTENT/(N)ON PERSISTENT MESSAGES
//* MESSAGES ARE PRINTED TO DD SYSPRINT
//*
//*********************************************************************
//PUTMSGS EXEC PGM=CSQ4BVK1,
// PARM=('QMGR,QUEUE.NAME,003,R,0010,N')
//STEPLIB DD DSN=MQSERIES.SCSQAUTH,DISP=SHR
// DD DSN=MQSERIES.SCSQLOAD,DISP=SHR
//SYSDBOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSOUX DD SYSOUT=*
//CEEDUMP DD SYSOUT=* |
|
Back to top |
|
 |
pinhead |
Posted: Mon Oct 16, 2006 4:46 am Post subject: |
|
|
 Newbie
Joined: 30 Dec 2004 Posts: 8 Location: Hartford, CT
|
Your best bet would be to talk to someone in your shop to help you compile/link the sample code into an executable library (these procedures are usually installation dependent, and I know ours would not work in your shop. I'm including JCL (without jobcard), which you should be able to use once you get the sample code compiled/linked. No modifications are needed to the source to work.
PUT JCL:
//PUTMSGS EXEC PGM=CSQ4BVK1,REGION=1024K,
// PARM=('MQR2,SAMPQ,5,Z,100,N')
//STEPLIB DD DSN=@TSMT37.MQ.LOAD,DISP=SHR
// DD DSN=SYS1.SCSQANLE,DISP=SHR
// DD DSN=SYS1.SCSQAUTH,DISP=SHR
//SYSDBOUT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
A couple of things to keep in mind:
I'm not sure how your shop is set up, but because this is batch, you have to make sure the job runs on the processor the qmgr runs on.
The steplib has to include the installed SCSQANLE and SCSQAUTH libraries as they are in your environment, in addition to the library you compiled/linked the sample code to.
Here's the comments as provided by IBM for the PARM values, they don't all have to be used:
- FIRST PARM (++QMGR++) QUEUE MANAGER NAME
- SECOND PARM (++QUEUE++) QUEUE NAME
- THIRD PARM (++MSGS++) THE NUMBER OF MESSAGES TO PUT-(9999)
- FOURTH PARM (++PAD++) THE PADDING CHARACTER
- FIFTH PARM (++LEN++) THE LENGTH OF EACH MESSAGE-(9999)
- SIXTH PARM (++PERS++) (P)ERSISTENT/(N)ON PERSISTENT MESSAGES |
|
Back to top |
|
 |
|