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 » For Statement with Condition

Post new topic  Reply to topic
 For Statement with Condition « View previous topic :: View next topic » 
Author Message
akir
PostPosted: Tue Jul 15, 2008 9:29 am    Post subject: For Statement with Condition Reply with quote

Acolyte

Joined: 28 Jun 2007
Posts: 51

Hello Everyone,
Can anyone tell me how to write a FOR statement looping through an SAP structure along with a condition attached to it.Such that I obtain a Sub Array

I have searched the help and found out the
Code:
FOR ALL Body.Invoice.Purchases."Item"[] AS I (I.Quantity <= 50)


But Iam failing to implement the same with namespaces around it .Iam facing syntatical errors.Please give an example if you have implemented.

I want something like this...
Code:
FOR InInbound01Ref AS InputRoot.MRM.NS01:Data_record.NS03:sap_y_pedigree_inbound01_cwdata.NS03:sap_y_pedigree_inbound01_z2ymput_pedinds000.NS04:sap_y_pedigree_inbound01_z2ymput_pedinds000[]  DO

FOR InD010Ref AS InputRoot.MRM.NS01:Data_record.NS03:sap_y_pedigree_inbound01_cwdata.NS03:sap_y_pedigree_inbound01_z2ymput_pedinds000.NS04:sap_y_pedigree_inbound01_z2ymput_pedinds000[] where InD010.ref='SOMEINPUT'  DO

and thus obtain a sub array.
_________________
Thanks and Regards,
Akir

Tell everyone what you want to do and someone will want to help you do it.-W. Clement Stone
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
sourdas2
PostPosted: Tue Jul 15, 2008 9:56 am    Post subject: For Statement with Condition Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Your syntax would be opposite

Code:

FOR InputRoot.MRM.NS01:Data_record.NS03:sap_y_pedigree_inbound01_cwdata.NS03:sap_y_pedigree_inbound01_z2ymput_pedinds000.NS04:sap_y_pedigree_inbound01_z2ymput_pedinds000[] AS InInbound01Ref DO


or you can try something like this

Code:

DECLARE RefToItem REFERENCE TO InputRoot.MRM.NS01:Data_record.NS03:sap_y_pedigree_inbound01_cwdata.NS03:sap_y_pedigree_inbound01_z2ymput_pedinds000.NS04:sap_y_pedigree_inbound01_z2ymput_pedinds000[1];

FOR RefToItem (RefToItem.ref='SOMEINPUT') DO
--coding

_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » For Statement with Condition
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.