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 Index » WebSphere Message Broker (ACE) Support » Issue with the MsgTest tool

Post new topic  Reply to topic
 Issue with the MsgTest tool « View previous topic :: View next topic » 
Author Message
DJN2
PostPosted: Fri Feb 27, 2009 1:19 pm    Post subject: Issue with the MsgTest tool Reply with quote

Apprentice

Joined: 02 Jan 2009
Posts: 27
Location: New Jersey

I am attempting to create files from messages retrieved from a queue. I need to incorporate the Putdate and Puttime from the MQMD into the file name. I have tried a number of different approaches but have not been able to get it to work. This is being done in a For Ever loop where I first get the message and then write out the file. Therefore I need to get the MQMD PutDate and PutTime files in the GetMsg block or right after it. Does anyone know how to access the MQMD while processing in the Test block?

Here is my code ....

<?xml version="1.0"?>
<!-- Test GetFile PutFile functionality -->
<MsgTest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\MsgTest\Schema\MsgTest.xsd">
<Control>
<QMgr>%1%</QMgr>
<Host>%2%</Host>
<Port>%3%</Port>
<Channel>SYSTEM.DEF.SVRCONN</Channel>

<TestLog>
<File>Get_Q2F_%4%.log</File>
<Dir>%5%\Log</Dir>
</TestLog>

<TestReport>
<File>Get_Q2F_%4%.rpt</File>
<Dir>%5%\Report</Dir>
</TestReport>

<TestMaxWait >100</TestMaxWait>
<NextLogMsgInterval>1</NextLogMsgInterval>
<Concurrency >2</Concurrency>
<ConcurrencyWait >500</ConcurrencyWait>
<OnError >LOG</OnError>
</Control>

<!-- Set up default directories for the GetFile and PutFile commands -->
<Defaults>
<Str Name="Buff" >BUFFER</Str>
<Str Name="InputQueue" >%4% </Str>
<Str Name="LoopControl">'Y' </Str>
<Str Name="FileDate" >%6% </Str>

<PutFile>
<Buffer>%Buff%</Buffer>
</PutFile>
</Defaults>

<Test Name="Test Run ">
<ForEver Name="COUNT" Format="%05d">
<!-- Get message from an OUT queue (OUT queue is our input here)-->
<GetMsg>
<If Cond= "%LoopControl% .EQ. 'Y'">
<Browse Mode ="FIRST" />
<Str Name="LoopControl">'N' </Str>
<Else/>
<Browse Mode ="NEXT" />
</If>

<MsgId/>
<CorrelId/>
<Q>%InputQueue%</Q>
<BreakOnRC>2033</BreakOnRC>
<Buffer>%Buff%</Buffer>


</GetMsg>

<!-- Put MQMD PutDate to a variable -->


<!-- Write to a file -->
<PutFile>
<File>%InputQueue%_%COUNT%.data</File>
<MQMDFile>%InputQueue%_%COUNT%.mqmd</MQMDFile>
<Dir>%5%\OutputFile</Dir>
</PutFile>
</ForEver>
</Test>
</MsgTest>
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issue with the MsgTest tool
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.