Author |
Message
|
PaulClarke |
Posted: Tue Jan 14, 2014 7:41 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Surely with the above command it would say
Code: |
"Can not open input file 'file1.txt'" |
Why doesn't it ? _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
exerk |
Posted: Tue Jan 14, 2014 8:02 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PaulClarke wrote: |
Surely with the above command it would say
Code: |
"Can not open input file 'file1.txt'" |
Why doesn't it ? |
The OP stated his files are named file1.txt, file2.txt, file3.txt, file4.txt, and file5.txt, but seems absolutely insistent on not adding the file extension to the command line, despite hints and explicit statements from you to do so.
It makes me wonder whether "...The error messages is "Can not open input file 'file1'..." would turn into success, or "...The error messages is "Can not open input file 'file1.txt'..."  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
vadivem |
Posted: Tue Jan 14, 2014 10:54 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 25
|
if I use q program with same user it is loading a message successfully. that means it is not user permission problem.
q -otest -mdemo -Ffile1.txt
In addition to that I have used different windows machine but this time I'm getting different error.
The error is :
qload.exe -otest -mdemo -ffile%n.txt
QLOAD Program by Paul Clarke [ V1.9 Build:Jun 19 2012 ]
File 'file1.txt' does not appear to be a QLOAD file |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Jan 14, 2014 11:03 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
The file formats of Q and QLOAD are completely different. You can't mix and match. Q is mainly dealing with just the message content whereas QLOAD saves and restores the message Descriptor as well.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
vadivem |
Posted: Tue Jan 14, 2014 12:42 pm Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 25
|
Thanks Paul,
Please correct me If I understood wrongly. whatever the messages that unloaded through qload utility that can only reload through qload.
if this is correct what could be best practice to load bunch of messages in N number of files. |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Jan 14, 2014 12:57 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Yes, QLOAD expects to load only files that QLOAD created in the first place (although it can also parse the output of AMQSBCG).
Not sure what you mean by best practice but the sequence of commands I did above works for me. Of course it is just possible that I am using a later version of QLOAD that was released as a SupportPac.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
vadivem |
Posted: Tue Jan 14, 2014 1:15 pm Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 25
|
Sorry Paul,
My messages are not unloaded through qload utility. Is there any other alternatives to load bunch of messages which are coming from BizTalk system? |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Jan 14, 2014 2:06 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I'm not familiar with Biztalk I'm afraid. However, there do seem to be lots of pages on the web talking about Biztalk to MQSeries bridge.
As for loading a file onto a queue there are lots of ways to do it but the key question I guess is what format is the file in. Does it contain just the message payload or does it contain context fields which should be put into the message descriptor. I wouldn't be at all surprised if you need a particular application though rather than using something generic like Q. of course to read a file and issue an MQPUT is pretty easy so you could always consider writing an application yourself or paying someone a few bucks to do it for you.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
vadivem |
Posted: Wed Jan 15, 2014 2:09 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 25
|
Thanks once again Paul,
Here is the sample message which comes from BizTalk service, like this I have 100 messages in 100 txt files. If you just copy and paste in notepad you will get the right format.
{1:F01YYYYGB2LAXXX7119375848}{2:O1031124121219BSCXXSXXAXXX38473386231212191024N}{3:{108:7000000064317710}{119:STP}}{4:
:20:5913696001468504
:23B:CRED
:32A:121219GBP0000,6
:33B:XXX1153,6
:50K:/00123412346000741234
FALXXNUNI FACTORING Y CONFIRMING S.
AV CANXXXXXX S/N
28660 XXXXXXLA DEL XXXXX
ES S A12345562
:52A:BSCHESMMXXX
:57A:HBZUGB2LXXX
:59:/GB20HBZU12345620123456
XYZXY CIRCXYZ LTD (VF
XYZDX REXNX UNXDX
:70:ADVANCE PAYMENT (BUYER:GB001219500)
CIXXXX STORES LIMITED)
:71A:SHA
-}{5:{CHK:XXXXC56BEC4}} |
|
Back to top |
|
 |
zpat |
Posted: Wed Jan 15, 2014 2:43 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
This seems to be making a mountain out of a molehill.
Just use MA01 queue program to load the file into a message.
If you have more than one file, code a shell script to call MA01 several times. This script can read the file names from a directory or do any of the many things that a shell script can easily do.
Simples.
If your QM is remote from your app server, then use MQ client mode connection (with CCDT or MQSERVER variable) like this:
SET MQSERVER=<channelname>/TCP/<address(port)>
q -m <QMNAME> -F <FILENAME> -o <QUEUENAME> -lmqic32 -apd
If it's not client mode, leave out the -lmqic32 _________________ 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 |
|
 |
cronydude |
Posted: Fri Jan 24, 2014 2:20 pm Post subject: |
|
|
 Voyager
Joined: 11 Nov 2001 Posts: 85 Location: US
|
I had similar requirement but I needed to load all msgs as text messages (set format to MQSTR). I tried different tools and here are the results -
q - Although this tool allows to set mqmd format, it did not work for loading multiple files all at once, works well for single files.
qload - It can be used to load multiple files but the files should have been originally created using qload
rfhutil - Works but doesn't allow to set mqmd properties that could be applied to multiple files
I ended up doing what zpat suggested, wrote a simple shell script calling q in a for loop. _________________ Regs,
crony
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
|