ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexGeneral IBM MQ SupportMA0T Utility Question

Post new topicReply to topic
MA0T Utility Question View previous topic :: View next topic
Author Message
kirankinnu
PostPosted: Fri Nov 16, 2007 6:06 am Post subject: MA0T Utility Question Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Hello Folks,
I am using this utility to pick the file from the folder and drop it into the queue. I am able to do this successfully. Our req is we have to send the filename in the message headers(Most Likely RFH2 Header). I am not able to do this. I would appreciate If anyone could let me know, how to do this using the MA0T utility.

Thank You,
Kiran
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 16, 2007 6:13 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Sure, you can do this.

You can use the %LastFile% to get the name of the last file used from GetFile or PutFile.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Fri Nov 16, 2007 8:07 am Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Thanks Jeff for the reply.

The problem over here is I am able to get the filename to the Userlogs, But I need to pass the filename in one of the message header field.

I tried adding this in the xml file:
<RFH2 Name="RF01">
<Folder><![CDATA[<usr><content>%1%</content></usr>]]></Folder>
<Format>MQSTR</Format>
</RFH2>
<PutMsg RFH2="RF01">
<Q>QA_DM_CONED_TRIP</Q>
</PutMsg>

Where %1% is the file name I am passing as parameter. And In the output RFH2 header I am seeing %1% rather than the filename. It makes sense as I am giving the statement in CDATA section, It is not recognizing %1%. How can we give a variable/parameter inside the CDATA section. Or is there a way to send the filename in any of the header fields.

Thank You for the support.
Kiran
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 16, 2007 8:57 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You didn't mention CDATA in your original question...

I think you can do this with string variables - to create the text "<![[CDATA[<usr><content>(interpolated file name)</content></usr>]]>"
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Fri Nov 16, 2007 10:57 am Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Generally we have filenames from 50-75 chars long. It looks like I can only send the filename in the MQMD header. I am able to send the filename in other fields like ApplOriginData, PutApplName.. But when I get the filename, its been truncated as these fields only hold 48 chars I guess.
Coming to RFH2, It looks like it only accepts the CDATA xml in the Folder section. I am not sure how to eliminate CDATA and populate the field I require in RFH2 header.

Jeff: If you don't mind, can you explain a bit more about "interpolated file name".

Here is the description and example I got from the Guide
<Folder> – This element is used to contain the data for an RFH2 folder. As the data is in XML format it must be enclosed in a CDATA section. Folders are named after the highest-level XML element, so the folder in the example below would be named “four” and “three”.

<RFH2 Name=”RF01”>
<Folder><![CDATA[<four>4</four>]]></Folder>
<Folder><![CDATA[<three>3</three>]]></Folder>
<Format>MQSTR</Format>
</RFH2>



Thanks Again,
Kiran
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 16, 2007 11:09 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I meant your %1% by "interpolated filename".

I mean construct a String Variable in the MAOT configuration, that ends up holding the whole CDATA tag text. Like if your filename is "abc.txt" then the whole string you would construct would be sometihng like
"<![CDATA[<usr><content>abc.txt</content></usr>]]>".

And you would build it in pieces using concatenation - by sticking "<![CDATA[<usr><content>" with your %1% and then "</content></usr>]]>". Say you called this the %FILE% variable

And then your RFH definition would be like
<Folder>%FILE%</Folder>

So that the %1% would not be inside a CDATA, and would be interpolated into the file name. And the %FILE% should be interpolated into the right thing.

You can't fit a 50 character long file name in an MQMD header. There isn't a single field that will hold it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Fri Nov 16, 2007 1:54 pm Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

This thing is driving me crazy.

Jeff - I am not able to do what you said. It looks like its looking for CDATA and <and giving parsing error.

Most likely I have to contact the person who built the Utility. I hope he gets back to me.

The funny thing is If I use the
<Str Name="FileName1"><![CDATA[<usr><content>%1%</content></usr>]]></Str>
I am able to get the filename in %1% . This is the output I got for FileName1 : <usr><content>NYPA4389.1.111420070344.SCENARIO.KIRAN3EBCDIC</content></usr>

But I am not able to use this in
<RFH2 Name="RF01"><Folder><![CDATA[<usr>%FileName1%</usr>]]></Folder></RFH2>
Thanks,
Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 16, 2007 2:10 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Thats because the usr folder takes only property value pairs.
You have just a value but no property (i.e. tag name)
Quote:
<RFH2 Name="RF01"><Folder><![CDATA[<usr>%FileName1%</usr>]]></Folder></RFH2>

Try:<RFH2 Name="RF01"><Folder><![CDATA[<usr><filename>%LastFile%</filename></usr>]]></Folder></RFH2>
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Nov 16, 2007 4:30 pm Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

FJ
I think that the <![CDATA[ section prevent any interpolation of %variable%.

So I think that won't work.

Kirinkinnu - I'm mostly guessing here, unfortunately.

But if you try changing it to
<Str Name="FileName1">"<!CData[<usr><content>"%1%"</content><usr>]]>"</str>

Or similar, using a concatenation to connect the pieces... ?

And then use <RFH2 Name="RFH01"><Folder>%FileName1%</Folder>... ?

Also, Tim John Armstrong, the author, is on Australia Time. So he may get back to you ... soonish... but not necessarily on your timezone.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Nov 17, 2007 6:16 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Jeff my point was about the content of the CDATA usr folder.
In his exemple kirankinnu had only a value in the usr folder instead of having a property value pair.


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kirankinnu
PostPosted: Sat Nov 17, 2007 6:56 am Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

fjb_saper - It doesnot matter whether I use
<Folder><![CDATA[<usr><filename>%FileName1%</filename></usr>]]></Folder>
OR
<Folder><![CDATA[<usr>%FileName1%</usr>]]></Folder>

Its only showing %FileName1% in the output.
Thank You for the support though...

I got hold of the person who developed this Utility. I will post the solution once I figure it out.

Thank You,
Kiran
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Tue Nov 27, 2007 8:26 am Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Finally what I found out is, MA0T Utility doesnot support what I was trying to do. Maybe in the future releases, it will have this feature.

Thank You for the support.
Kiran
Back to top
View user's profile Send private message
timjohnarm
PostPosted: Fri May 09, 2008 2:16 am Post subject: Reply with quote

Apprentice

Joined: 28 Sep 2004
Posts: 40
Location: Melbourne Australia

On contacting me on issues with the ma0t supportpac its probably best to email me at the address in the documentation.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportMA0T Utility Question
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.