Author |
Message
|
n3wb1e96 |
Posted: Fri Nov 27, 2009 7:23 am Post subject: MA01 - read from file write to Q |
|
|
 Newbie
Joined: 12 Nov 2008 Posts: 9
|
I'm having some issues using a file as input to the Q program on windows (XP). I want the whole file to be used as a single message.
If I use the option 'q -m MB7QMGR -f "C:\testFile.xml" -o MYQUEUE.IN', as expected, each line in the input file is put as a separate message to the queue.
I therefore tried - 'q -m MB7QMGR -F "C:\testFile.xml" -o MYQUEUE.IN' but I get -
"MQSeries Q Program by Paul Clarke [ V5.0.0 Build:Jul 15 2008 ]
Sorry to use a load/unload file you must either be loading or unloading
Specify either '-i' or '-o'"
I've tried several variations but have not been able to achieve what I want. Can a fresh pair of eyes help me out?
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 27, 2009 7:37 am Post subject: Re: MA01 - read from file write to Q |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
n3wb1e96 wrote: |
I've tried several variations but have not been able to achieve what I want. Can a fresh pair of eyes help me out?
|
I wasn't aware that support pac could be used for what you want.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 27, 2009 8:00 am Post subject: Re: MA01 - read from file write to Q |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
n3wb1e96 wrote: |
I'm having some issues using a file as input to the Q program on windows (XP). I want the whole file to be used as a single message.
If I use the option 'q -m MB7QMGR -f "C:\testFile.xml" -o MYQUEUE.IN', as expected, each line in the input file is put as a separate message to the queue.
I therefore tried - 'q -m MB7QMGR -F "C:\testFile.xml" -o MYQUEUE.IN' but I get -
"MQSeries Q Program by Paul Clarke [ V5.0.0 Build:Jul 15 2008 ]
Sorry to use a load/unload file you must either be loading or unloading
Specify either '-i' or '-o'"
I've tried several variations but have not been able to achieve what I want. Can a fresh pair of eyes help me out?
Thanks |
Review the documentation of the support pack.
Sounds to me like you are using -o where you should be using -i ??  _________________ MQ & Broker admin |
|
Back to top |
|
 |
n3wb1e96 |
Posted: Fri Nov 27, 2009 8:09 am Post subject: |
|
|
 Newbie
Joined: 12 Nov 2008 Posts: 9
|
Thanks for your responses so far.
I had tried the -i option but it yielded the same response - Sorry to use a load/unload file you must either be loading or unloading Specify either '-i' or '-o'" .
From what I can see, the documentation does allude to the possibility of being able to use a file as input to a queue... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 27, 2009 8:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
n3wb1e96 wrote: |
Thanks for your responses so far.
I had tried the -i option but it yielded the same response - Sorry to use a load/unload file you must either be loading or unloading Specify either '-i' or '-o'" .
From what I can see, the documentation does allude to the possibility of being able to use a file as input to a queue... |
Did you use the parameters in the EXACT order of the documentation?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
n3wb1e96 |
Posted: Mon Nov 30, 2009 8:57 am Post subject: |
|
|
 Newbie
Joined: 12 Nov 2008 Posts: 9
|
The documentation doesn't specify the order in which to use the parameters. It only gives an alphabetical listing of the parameters... In the absence of a guide on the order of using the parameters I guess I'll have to continue with different combinations of parameters.... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 30, 2009 9:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
n3wb1e96 wrote: |
From what I can see, the documentation does allude to the possibility of being able to use a file as input to a queue... |
I still think that refers to the specific file, but do post the solution if you discover different.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dyevin |
Posted: Wed Aug 04, 2010 1:56 pm Post subject: |
|
|
Novice
Joined: 27 May 2003 Posts: 11 Location: Phoenix, Arizona
|
I encountered the same error that you did when specifying the -F flag. I simply specified -o before -F in my command stream and was able to successfully read the file and create a single message in my output queue. |
|
Back to top |
|
 |
pdmenon |
Posted: Wed Aug 04, 2010 11:24 pm Post subject: |
|
|
 Voyager
Joined: 05 Apr 2010 Posts: 80
|
If you want the whole file to be used as a single message, you can use RFHUTIL where in, just load the file(preferably text file) and write in the desired queue.
If you already know, pls ignore this...  |
|
Back to top |
|
 |
Mr Butcher |
Posted: Thu Aug 05, 2010 12:56 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
i gave it a quick try, and it seems to be related to the parameter sequence....
Code: |
./q -o MQIVP.QL.Q1 -m CST1 -F mqput.rexx
MQSeries Q Program by Paul Clarke [ V4.5 Build:Sep 18 2006 ]
Connecting ...
connected to 'CST1'.
./q -F mqput.rexx -o MQIVP.QL.Q1 -m CST1
MQSeries Q Program by Paul Clarke [ V4.5 Build:Sep 18 2006 ]
Sorry to use a load/unload file you must either be loading or unloading
Specify either '-i' or '-o' |
_________________ Regards, Butcher |
|
Back to top |
|
 |
|