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 » Create VS Set Statement

Post new topic  Reply to topic
 Create VS Set Statement « View previous topic :: View next topic » 
Author Message
sugan87
PostPosted: Tue Aug 02, 2016 12:06 am    Post subject: Create VS Set Statement Reply with quote

Novice

Joined: 14 Jul 2016
Posts: 18

What is the deference between the below two statement. Both are providing the same output. Which is best practice.

1)
CREATE FIELD OutputRoot.XMLNSC.BankCustomer;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC.BankCustomer NAME 'KEY' VALUE InputRoot.XMLNSC.Customer.Key


2) Set OutputRoot.XMLNSC.BankCustomer.Key = InputRoot.XMLNSC.Customer.Key
Back to top
View user's profile Send private message
timber
PostPosted: Tue Aug 02, 2016 3:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

What are your own thoughts?
Back to top
View user's profile Send private message
Bichu
PostPosted: Tue Aug 02, 2016 3:12 am    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2011
Posts: 124
Location: London

First One.

When you are having xml attributes or namespaces, it wont copy if you use the second option. Also, its good to specify the DOMAIN attribute when creating first child.
Back to top
View user's profile Send private message
sugan87
PostPosted: Tue Aug 02, 2016 4:53 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2016
Posts: 18

thank you guys,


Process wise how this two statement will differ? which is best in performance?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 02, 2016 6:38 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Which is better in performance?

The one that your performance tests indicate is better in performance.

Using a CREATE statement exclusively may work just fine, as long as you don't end up creating more elements than you need.

Using a CREATE statement gives you more control over what you create and where, and you can do "more things" in one command. But as your example shows, you need to create two elements - the parent element and the child element - in two statements. Whereas the set statement is a single statement.

But the single statement still has to create both elements, unless the parent is already created.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Create VS Set Statement
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.