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 » To find total length

Post new topic  Reply to topic
 To find total length « View previous topic :: View next topic » 
Author Message
rasol
PostPosted: Wed Aug 16, 2006 12:39 pm    Post subject: To find total length Reply with quote

Novice

Joined: 08 Aug 2006
Posts: 14

I need to find the total length of record which is in CWF format.I used the following esql but nothing is return. I am using WBIMB 5 on windows

SET RecordLength = LENGTH(OutputRoot.MRM.HEADER-DATA);
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 16, 2006 12:49 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What does the ESQL documentation on the LENGTH function say?

Does it say that it works on sub-trees?

Does HEADER-DATA have child fields? Or is it a single value?

You should spend some more time reading the documentation, and definitely get some training on this product. It's complicated and you are missing some key concepts, I think.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rasol
PostPosted: Wed Aug 16, 2006 1:14 pm    Post subject: Reply with quote

Novice

Joined: 08 Aug 2006
Posts: 14

Thank for ur response jeff.

I am sorry with HEADER-DATA which is one of the element in the message but I want the length of entire message which is in CWF format.

SET RecordLength = LENGTH(OutputRoot.MRM);

I can find the total length,if I convert the message to BLOB but i cannot do the same with the original output CWF message.

I am going thru ESQL documentation and also thru the forum. Nothing I can see probably I am missing something/oversight.
Back to top
View user's profile Send private message
JT
PostPosted: Wed Aug 16, 2006 2:37 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
I can find the total length,if I convert the message to BLOB but i cannot do the same with the original output CWF message.

Can you clarify what you mean by "original output CWF message"?
Back to top
View user's profile Send private message
rasol
PostPosted: Wed Aug 16, 2006 3:58 pm    Post subject: Reply with quote

Novice

Joined: 08 Aug 2006
Posts: 14

Sorry for the confusion.I mean Output CWF message.

I am converting input XML message to CWF format.One of the fields in CWF format needs the RECORD LENGTH because the CWF layout uses the depending on clause.

Hope you understand!!!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 16, 2006 4:02 pm    Post subject: Reply with quote

Grand High Poobah

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

rasol wrote:
Sorry for the confusion.I mean Output CWF message.

I am converting input XML message to CWF format.One of the fields in CWF format needs the RECORD LENGTH because the CWF layout uses the depending on clause.

Hope you understand!!!

As we are talking about CWF format the record length should be fixed depending on type and you should be able to code for it.

Now if you need to now the number of repetitions you should be able to get this too.

And none of those have anything to do with the total length of the message... but for the fact that they contribute to it's calculation...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rasol
PostPosted: Wed Aug 16, 2006 10:32 pm    Post subject: Reply with quote

Novice

Joined: 08 Aug 2006
Posts: 14

fjb_saper your exactly correct and I can figure out the length since CWF is fixed format.

for eg

01 A.
05 B PIC X(05)
05 C PIC X(05)

Now I can hardcode in my esql 10 as record length.

01 A.
05 B PIC X(05)
05 C OCCUR 10 TIMES DEPENDING ON B
10 D PIC X(05).

But if its with depending ON Clause then I need to calculate C * D + B. This has to be hardcoded in esql.

If there is change in the COPYBOOK layout then I have to modify the esql.To avoid this situation and to code efficiently. I thougth of getting the length of message and is it possible in WBI?.

Please advise.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Aug 17, 2006 2:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You certainly cannot find the length by applying the LENGTH function to the root of the MRM tree. LENGTH only works on BIT, BLOB and CHARACTER data types. The docs make that perfectly clear.
Use ASBITSTREAM, find the length of the BLOB, and then output the message in the BLOB domain.
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 » To find total length
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.