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 » variable length string in CWF fromat

Post new topic  Reply to topic
 variable length string in CWF fromat « View previous topic :: View next topic » 
Author Message
suraj
PostPosted: Tue Mar 04, 2008 3:17 pm    Post subject: variable length string in CWF fromat Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

hi..

I am using the CWF to model a messge. The input message has its last field which is variable in length. So how do i handle this??
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Mar 04, 2008 3:47 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Use TDS instead of CWF. You need to use Variable Length Elements Delimited, and don't set the Length property on the last field.
Back to top
View user's profile Send private message
suraj
PostPosted: Tue Mar 04, 2008 7:40 pm    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

the messages that i am dealing with are cobol, which hv copybook definitions for them.. so they should be modeled in cwf format
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 04, 2008 9:37 pm    Post subject: Reply with quote

Grand High Poobah

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

suraj wrote:
the messages that i am dealing with are cobol, which hv copybook definitions for them.. so they should be modeled in cwf format


If the last field is of variable length I suspect an occurs depending clause.
You NEED to have that number and field passed before the 1st occurence of the field...


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
AkankshA
PostPosted: Tue Mar 04, 2008 10:03 pm    Post subject: Re: variable length string in CWF fromat Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

suraj wrote:
hi..

I am using the CWF to model a messge. The input message has its last field which is variable in length. So how do i handle this??


i remember using some property for last element something which says till the end of field...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Wed Mar 05, 2008 4:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You can specify Length Units = End of Bitstream if you want to do it that way.
Back to top
View user's profile Send private message
suraj
PostPosted: Wed Mar 05, 2008 7:43 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

thanks for the replies...
i have tried all options...but its still not working. any other suggestions ??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 05, 2008 7:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Clearly you haven't tried all options, as one of the options was "Use TDS instead".

Also, copybook does not require that you use CWF, in fact some copy books may require that you use TDS.

The only feature of copybooks that require CWF are packed decimals... and that may even be handleable in TDS with binary fields (in 6.1).

Otherwise, please be very specific about a) what you've tried, b) what "not working" means.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
grammer
PostPosted: Wed Mar 05, 2008 7:51 am    Post subject: Reply with quote

Novice

Joined: 08 Feb 2008
Posts: 16
Location: Canada

kimbert wrote:
You can specify Length Units = End of Bitstream if you want to do it that way.


that way should work since that how i did it for one of mine messages
Back to top
View user's profile Send private message
suraj
PostPosted: Wed Mar 05, 2008 7:56 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

i have'nt tried using TDS... I will try that out...
But i just want to know whether there is no way to handle variable length feilds in CWF format...
Back to top
View user's profile Send private message
grammer
PostPosted: Wed Mar 05, 2008 8:19 am    Post subject: Reply with quote

Novice

Joined: 08 Feb 2008
Posts: 16
Location: Canada

in your msg set under msg definiton
-> open it adn expand the tree for messages _
-> keep going till you hiot the elemnts and go to properties under CWF set Length of units to End of bit stream

I think thats all i did, took me a while to figure it out for the first time
Back to top
View user's profile Send private message
suraj
PostPosted: Wed Mar 05, 2008 8:19 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

as i hv specified earlier.. only the last fiels of the mesasge is of variable lenght.
this is how the copybook looks like..
01 DATA
03 DATA-AREA
05 ID PIC X(05)
05 TYPE PIC X(05)
05 NBR PIC 9(9)
05 NAME PIC X(30)

Now, the NAME field which is 30 bytes in length in copybook def, manytimes has length less than 30 bytes in the incoming msg.
So when i try to parse the i/p msg.. i get a parsing error saying that the length of that feild is too short..
Back to top
View user's profile Send private message
suraj
PostPosted: Wed Mar 05, 2008 8:26 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jul 2007
Posts: 56

the End of bitstream did work.... thanks for your help..
Back to top
View user's profile Send private message
grammer
PostPosted: Wed Mar 05, 2008 9:04 am    Post subject: Reply with quote

Novice

Joined: 08 Feb 2008
Posts: 16
Location: Canada

nice
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 05, 2008 2:50 pm    Post subject: Reply with quote

Grand High Poobah

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

suraj wrote:
as i hv specified earlier.. only the last fiels of the mesasge is of variable lenght.
this is how the copybook looks like..
01 DATA
03 DATA-AREA
05 ID PIC X(05)
05 TYPE PIC X(05)
05 NBR PIC 9(9)
05 NAME PIC X(30)

Now, the NAME field which is 30 bytes in length in copybook def, manytimes has length less than 30 bytes in the incoming msg.
So when i try to parse the i/p msg.. i get a parsing error saying that the length of that feild is too short..

Would that be because your FTP cuts trailing spaces?
Use MQ and the trailing spaces should be there.

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » variable length string in CWF fromat
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.