Author |
Message
|
skeng |
Posted: Fri Aug 04, 2006 8:28 am Post subject: VSAMInput node result |
|
|
Newbie
Joined: 03 Aug 2006 Posts: 4
|
I am trying to use VSAMInput node to retrieve records from VSAM file. I manage to get the results however the records are returned in the form of 1 message per record.
Is there a way to consolidate the results and return them in ONE single message? |
|
Back to top |
|
 |
vennela |
Posted: Fri Aug 04, 2006 9:43 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
Is there a way to consolidate the results and return them in ONE single message? |
Why?
IMHO one message for each record is better. |
|
Back to top |
|
 |
skeng |
Posted: Sat Aug 05, 2006 8:32 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2006 Posts: 4
|
the application is expecting a list of records in a single message. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Aug 05, 2006 2:05 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You could use the Aggregation nodes and the MQGet node.
You can't solve this problem with just the Aggregation nodes.
I'd see two flows, something like...
1) VSAMInput -> Compute (set grouping options) -> MQOutput
2) MQInput -> AggregateControl -> MQGet -> Compute -> AggregateRequest -> (loop back to MQGet)
AggregateResponse->Compute -> MQOutput(to application) _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Sat Aug 05, 2006 4:26 pm Post subject: |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
skeng wrote: |
the application is expecting a list of records in a single message. |
Lets go back to your flow and do some analysis. You said that you are using a VSAMInput node - this node is able to ream multiple VSAM records. The number of records read can be controlled by a Control msg sent to the node.
How many records are you requesting? and How many records are you receiving?
Have you compared your flow to the sample VSAMInput flow (page 64 in the doc)? Since that flow sends each record as an MQ message - what you will want to do is to save each record read in the Environment. The Status message then identifies when the node is finished.
Have you traced the status message?
This should not be a difficulat task. I believe that the VSAMInput node will do what you want - especially since it is basicall a "browse" operation. _________________ Bill Matthews |
|
Back to top |
|
 |
skeng |
Posted: Mon Aug 07, 2006 1:05 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2006 Posts: 4
|
jefflowrey, I'm actually using V5 WMB which do not have MQGet node. What do you suggest?
And what do you mean by '(loop back to MQGet)'?
Bill.MAtthews, I'm using the sample VSAMInput flow as the base of my flow. My request message doesn't control the number of records returned. What i need is to returned all records from the VSAM file, with the Maximum Number of Records set to 50.
What should i do with the records saved in the Environment? Yes, i also get the status message. Can you please explain more detail on how the flow should look like? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 07, 2006 2:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
skeng wrote: |
jefflowrey, I'm actually using V5 WMB which do not have MQGet node. What do you suggest?
And what do you mean by '(loop back to MQGet)'?
Bill.MAtthews, I'm using the sample VSAMInput flow as the base of my flow. My request message doesn't control the number of records returned. What i need is to returned all records from the VSAM file, with the Maximum Number of Records set to 50.
What should i do with the records saved in the Environment? Yes, i also get the status message. Can you please explain more detail on how the flow should look like? |
I believe the MQGet node is a support pack in V5. _________________ MQ & Broker admin |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Mon Aug 07, 2006 6:50 am Post subject: |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
skeng wrote: |
Bill.MAtthews, I'm using the sample VSAMInput flow as the base of my flow. My request message doesn't control the number of records returned. What i need is to returned all records from the VSAM file, with the Maximum Number of Records set to 50.
What should i do with the records saved in the Environment? Yes, i also get the status message. Can you please explain more detail on how the flow should look like? |
In the VSAMInput node's properties - what have you configured for the following sections and entries:
1. Request - Maximum Number of Records
2. Result - Output Data Location
In the Status information returned - there is a field - Successfulrecords - what does it contain?
-------
I would suggest that you define the Maximum Number of Records to be 50 (if that has not already been done).
I would then try using an output data location that is "defined" as an array - for example Environment.VSAM.Records[>] - to indicate the last one.
If that doesn't work - then connect either a Compute or a Filter node after the VSAMInput node and copy the record retried to an array in the environment.
Then - connect a Compute node to the Status Terminal - which is fired after the last record has been read - and then you can process the entries in the array variable to generate the response desired.
---------------
Concerning the MQGet support pack - while some folks have reported being able to get it to work, it was never updated to run on V5. _________________ Bill Matthews |
|
Back to top |
|
 |
skeng |
Posted: Tue Aug 08, 2006 2:14 am Post subject: |
|
|
Newbie
Joined: 03 Aug 2006 Posts: 4
|
Has anyone ever implemented a message flow using VSAMInput node?
I've tested the VSAMInput node, its behaviour is a bit strange.
MQInput --> Compute (Set AVariable to environment) --> VSAMInput
(Out) --> Compute (Out) (Set bVariable to environment)--> MQOutput
(Status) --> Compute (Status) --> MQOutput
At the Compute (Out) & Compute (Status), you will not get the AVariable.
At the Compute (Status), you will not be able to get bVariable too.
And after passing thru VSAMInput (Unlike VSAMRead), you actually do not get anything in MQMD or environment / LocalEnvironment. Looks like it has been cleared by the VSAMInput node. |
|
Back to top |
|
 |
|