Author |
Message
|
Jimmy3 |
Posted: Wed May 23, 2007 6:23 am Post subject: Can we use QLOAD as client? |
|
|
Novice
Joined: 08 May 2007 Posts: 16
|
Hi,
I am using Qload in windows. Can anybody let me know how to use Qload as client, and to connect to remote queue managers? I didnt find any arguments to pass the SVR.CONN channel or something.
Any information would be helpful. Thanks in advance. |
|
Back to top |
|
 |
Jimmy3 |
Posted: Fri Jun 22, 2007 8:51 am Post subject: |
|
|
Novice
Joined: 08 May 2007 Posts: 16
|
Hi,
I havent received reply for this message but thought will ask again. I have done something. Can anybody let me know where I am going wrong or what needs to be done other than this?
SET MQSERVER=SYSTEM.ADMIN.SVRCONN/TCP/ip(port)
qload –m <Qmgr> –i <q_name> –l mqic32 -f <file>
I am getting this response:
QLOAD Program by Paul Clarke [ V1.4 Build:Mar 29 2007 ]
(c) Copyright IBM Corp. 2005, 2006
Usage: QLOAD <Optional flags as below>
[-a <File access mode for fopen()>
a Append
b Binary
[-c <CCSID>[:X'Encoding'] Convert]
[-C [A][I][a][i][d][n] Context]
A Set all context (default)
I Set identity context
a Pass all context
i Pass identity context
d Default context
n No context
[-d <Display Options>]
a Add ASCII columns to HEX file
A Write ASCII lines rather than HEX
i Write message index
T Display time on queue
[-f <File Name> or -f <stdout>]
[-F <File Name> (forcing overwrite)]
[-i <Input Queue> (Browse)]
[-I <Input Queue> (Get)]
[-l <library name> e.g.mqm or mqic32]
[-m <Queue Manager name>]
[-o <Output Queue>]
[-p Purge source queue]
[-q Quiet]
[-r <Message Range>]
x Message x only
x..y Message x to message y
x#y y messages starting at message x
#x First x messages
[-t <Transaction Message Limit>]
[-T <Time on queue (Age) selection>
[[[DD:]HH:]MM ][,[[DD:]HH:]MM]
[-s <Ascii Search String>]
[-S <Ascii Not Search String>]
[-e <Ebcdic Search String>]
[-E <Ebcdic Not Search String>]
[-w <MQGET Wait interval(seconds)]
[-x <Hex Search String>]
[-X <Hex Not Search String>]
Examples
--------
Unload a queue to a file : qload -iQ1 -fmyfile
Load a queue from a file : qload -oQ1 -fmyfile
Copy a queue from Q1 to Q2 : qload -iQ1 -oQ2
Move a queue from Q1 to Q2 : qload -IQ1 -oQ2
Move old messages from Q1 to Q2 : qload -IQ1 -oQ2 -T1440
Convert from old file to new : qload -foldfile -fnewfile -da
Note: I even tried giving full path to mqic32: C:\Program Files\IBM\WebSphere MQ\bin\mqic32
and tried giving a space before the ip in setting MQSERVER. But nothing helped. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 22, 2007 12:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried:
SET MQSERVER="SYSTEM.ADMIN.SVRCONN/TCP/ip(port)" _________________ MQ & Broker admin |
|
Back to top |
|
 |
andrewkp |
Posted: Wed Nov 30, 2011 2:06 pm Post subject: |
|
|
Newbie
Joined: 30 Nov 2011 Posts: 2
|
QLOAD Program by Paul Clarke [ V1.6 Build:Jul 12 2008 ]
I am having the exact same problem - was it ever confirmed that setting the MQSERVER environment variable would resolve the issue?
Whatever I try it appears to use binding to the local queue manager and disreguard MQSERVER env var for the channel to the remote queue manager I am actually trying to connect to.
I have also tried this on a windows box and had the same problem. Channel string has been confirmed working and is fine with MQExplorer and rfhutil. Can anyone look at the code for qload? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Nov 30, 2011 2:26 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
andrewkp wrote: |
QLOAD Program by Paul Clarke [ V1.6 Build:Jul 12 2008 ]
I am having the exact same problem - was it ever confirmed that setting the MQSERVER environment variable would resolve the issue?
Whatever I try it appears to use binding to the local queue manager and disreguard MQSERVER env var for the channel to the remote queue manager I am actually trying to connect to.
I have also tried this on a windows box and had the same problem. Channel string has been confirmed working and is fine with MQExplorer and rfhutil. Can anyone look at the code for qload? |
are you specifying the "-l mqic" option? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 01, 2011 5:39 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
andrewkp wrote: |
I am having the exact same problem - was it ever confirmed that setting the MQSERVER environment variable would resolve the issue? |
It's how I run qload as a client. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Dec 01, 2011 6:03 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
CCDT is neater as always.
Jeff is correct, you need to refer to the client libraries. e.g.
qload -m QMGR1 -o XXXX_MESSAGES_QUEUE -f QLOAD_TEMP.txt -lmqic32 |
|
Back to top |
|
 |
PaulClarke |
Posted: Mon Jun 18, 2012 1:28 am Post subject: Paramter Syntax |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Hi,
If QLOAD outputs the parameter syntax help it means that it thinks you've used the wrong syntax. What is the exact format of command you are typing in ?
Cheers,
P. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
mvbharadwajamma |
Posted: Fri Mar 02, 2018 4:17 am Post subject: QLOAD v1.4 inconsistent while unloading the queue to a file |
|
|
Newbie
Joined: 02 Mar 2018 Posts: 3 Location: Hyderabad
|
Hi Folks
Here I have a scenario like I need to monitor a queue for it's curdepth, if it is >=50K, I need to unload (backup) the queue to a .QLD file, place it into a directory and then clear the queue. This should run in the windows server on daily basis, so I wrote a batch script for entire activity and created a basic task using task scheduler.
Flow should be : Check CURDEPTH of a Queue > QLOAD > CLEAR Queue
Unfortunately, QLOAD is working inconsistently like sometimes it works if I run it manually but not using task scheduler. Sometimes it work in both the aspects (Manual & Task Scheduler).
Sometimes while executing QLOAD, it just displays the USAGE (syntax) of QLOAD program even there are no syntax errors and skips to CLEAR command which shouldn't be done.
Here is the qload command from my batch script:
start "" E:\qload\mo03_qload\Windows\qload.exe | qload -m %1 -i%2 -fd:\qload_bkps\%2_%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~0,2%%time:~3,2%.qld -c437 -da >> log.txt 2>&1
Note:
> I am giving parameters in task scheduler for %1 & %2 (QMGR & Q Names)
> My queue manager is in local server only. I have also tested using -l (mq library) but NO LUCK.
Please review this and suggest me the best solution to make use of it.
Thanks in advance for your kind help.
Thanks
M V Bharadwaj |
|
Back to top |
|
 |
zpat |
Posted: Fri Mar 02, 2018 5:54 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If using MQ v8 or later then use dmpmqmsg as this is the IBM supported version and open a PMR if it doesn't work. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
mvbharadwajamma |
Posted: Fri Mar 02, 2018 6:29 am Post subject: QLOAD v1.4 inconsistent while unloading the queue to a file |
|
|
Newbie
Joined: 02 Mar 2018 Posts: 3 Location: Hyderabad
|
Sorry my friends, I did not mentioned the MQ Version in Windows Server.
Name: WebSphere MQ
Version: 7.5.0.5
Can anyone know is it due to the old version of QLOAD v1.4 program, if YES, why is this inconsistency !
Thanks in advance.
Best Regards
M V Bharadwaj |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri Mar 02, 2018 10:15 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I think in order to answer the question you'll need to give us more details. When you say sometimes it displayed the USAGE syntax and other times not that does seem very strange. It seems highly unlikely to me that there is a bug in any version of QLOAD where it randomly decodes the given parameters. It seems more likely to me that you script it not quite doing what you think it is doing.
As far as your script is concerned I am a little confused about what you are trying to achieve. At first glance it looks like you are trying to start the QLOAD program and then pipe the output to another QLOAD program! I can't think of any reason why you would ever want to do that and I could well believe you would get strange results.
As you may know we here at MQGem Software have a later version of QLOAD. If you really think that your problems are due to the age of QLOAD itself then we would be happy to send you a trial licence for the latest version (which has all sorts of new features). Just send an email to support@mqgem.com
Regards,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
mvbharadwajamma |
Posted: Fri Mar 02, 2018 10:42 pm Post subject: QLOAD v1.4 inconsistent while unloading the queue to a file |
|
|
Newbie
Joined: 02 Mar 2018 Posts: 3 Location: Hyderabad
|
Alright, let me share you the main logic in my batch script. PFB
REM %1=Queue manager
REM %2=Queue name
echo %date%-%time% >> log.txt && @echo: >> log.txt && echo dis ql(%2) where (CURDEPTH GE 10000) | runmqsc %1 >> log.txt && @echo: >> log.txt && start "" E:\qload\mo03_qload\Windows\qload.exe | qload -m %1 -i%2 -fd:\qload_bkps\%2_%date:~-10,2%%date:~-7,2%%date:~-4,4%_%time:~0,2%%time:~3,2%.qld -c437 -da >> log.txt 2>&1 && @echo: >> log.txt && echo clear ql(%2) | runmqsc %1 >> log.txt
goto theend
rem Unload the Queue to a file!
:help
echo Usage:
echo mqqldbatch.bat QueueManager QueueName
I have created a basic task scheduler using above "mqqldbatch.bat" batch script in our windows server, it will run on a daily basis. As soon as the script is executed, if the curdepth is 10000 then it will uload the queue into a .qld file, then clear the messages and it will update the result into log.txt file. PFB sample log.
----------------------------------------------------------------------------------
Fri 02/16/2018- 5:39:27.55
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Starting MQSC for queue manager SMPLQMGR.
1 : dis ql(SMPLQ1) where (CURDEPTH GE 4)
AMQ8409: Display Queue details.
QUEUE(SMPLQ1) TYPE(QLOCAL)
CURDEPTH(6)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
QLOAD Program by Paul Clarke [ V1.4 Build:Mar 29 2007 ]
Read - Files: 0 Messages: 6 Bytes: 40
Written - Files: 1 Messages: 6 Bytes: 40
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Starting MQSC for queue manager SMPLQMGR.
1 : clear ql(SMPLQ1)
AMQ8022: WebSphere MQ queue cleared.
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
---------------------------------------------------------------------------------
Note:
> When I created the basic task scheduler in our windows server, I gave the arguments as QueueManager Name and QueueNames to my batch script to run.
Suggest me if I am missing something or expecting unorthodox solution with this approach !?
Best Regards
M V Bharadwaj |
|
Back to top |
|
 |
|