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 » Length Count issue !!!!!!!!!!!

Post new topic  Reply to topic
 Length Count issue !!!!!!!!!!! « View previous topic :: View next topic » 
Author Message
bremen
PostPosted: Wed Jan 03, 2007 11:42 pm    Post subject: Length Count issue !!!!!!!!!!! Reply with quote

Novice

Joined: 28 Dec 2006
Posts: 16
Location: Hindustan

Hi,
My flow i/p is xml and o/p is CWF1(MB V5,UNIX). portion of i/p looks like this
<NOTE_TXT>---------</NOTE_TXT>(Maximu lenght can be up to 3000 chars). In the portion of o/p copybook looks like this
10 NOTE-TXT.
15 NOTE-TXT-LEN PIC S9(02) COMP.
15 NOTE-SEG OCCURS 1 TO 15 TIMES
DEPENDING ON NOTE-TXT-LEN
PIC X(200).
I am trying to generate o/p NOTE_SEG as chunks 200 from i/p.
Getting the following problem(CWF) when the i/p NOTE_TXT is having more than 200 char.

The message has a maximum or minimum length of 200 in the dictionary. The actual length is 1084.

How to set "Length Count" attribute for NOTE-SEG as per the req's

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 04, 2007 1:57 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need to
- Set NOTE-TXT-LEN to length(NOTE_TXT) / 200
- split NOTE_TXT into NOTE-TXT-LEN chunks of 200 chars and create a syntax element in the message tree for each chunk.
Back to top
View user's profile Send private message
bremen
PostPosted: Thu Jan 04, 2007 9:02 am    Post subject: Reply with quote

Novice

Joined: 28 Dec 2006
Posts: 16
Location: Hindustan

Kimbert,

I did like this:

SET OutputRoot.MRM.NOTE-TEXT.NOTE_SEG = Environment.Variables.NOTE_TXT;
DECLARE noteTxtCount INTEGER ;

SET noteTxtLength = LENGTH(Environment.Variables.NOTE_TXT);
SET OutputRoot.MRM.NOTE-TEXT.NOTE-TXT-LEN = CAST(noteTxtLength/200 AS INTEGER) + 1;

Still getting The message has a maximum or minimum length of 200 in the dictionary. The actual length is 1084

Kimbert : i didn't understand this "split NOTE_TXT into NOTE-TXT-LEN chunks of 200 chars and create a syntax element in the message tree for each chunk."

If i/p is 201 char's thn NOTE-TXT-LEN = 2; and i have to pass 400 chars(201 from i/p+SPACES(199))
If i/p is 1001 char's thn NOTE-TXT-LEN = 6; and i have to pass 1200 chars(1001 from i/p+SPACES(199))

How to set this dynamically depending on NOTE-TXT-LEN
can anyone help me to sort this problem .
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 04, 2007 1:26 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
i didn't understand this "split NOTE_TXT into NOTE-TXT-LEN chunks of 200 chars and create a syntax element in the message tree for each chunk."
Then you need to get some training. You cannot do this transformation automatically - you need to write some ESQL in a Compute node. Read the docs and search this forum for examples of 'CREATE LASTCHILD'.
Back to top
View user's profile Send private message
bremen
PostPosted: Thu Jan 04, 2007 2:13 pm    Post subject: Reply with quote

Novice

Joined: 28 Dec 2006
Posts: 16
Location: Hindustan

Kimbert,

I already used the CREATE function in my compute node to build the XML msg under EV's. I searched the forum too.But no chance.u pls giv me a brief esql/hint how to do that.
Thanks,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 04, 2007 3:13 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you know how to use Create Field, the rest of it is basic programming.

You have to create several fields, each of which are no larger than 200 characters long.
_________________
I am *not* the model of the modern major general.
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 » Length Count issue !!!!!!!!!!!
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.