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 » ESQL Coding tips

Post new topic  Reply to topic
 ESQL Coding tips « View previous topic :: View next topic » 
Author Message
Kazim_Baig
PostPosted: Tue Aug 16, 2016 3:13 am    Post subject: ESQL Coding tips Reply with quote

Novice

Joined: 26 Apr 2016
Posts: 19
Location: Bangalore

Hi All,

I need a small suggestion, my input is a XML message and I'am converting that to a Flat file using DFDL. My question is say suppose on of the field in the DFDL is of length 20 and the field that is being mapped to that from XML is of length 5 or 10 or anything below 20. Is there any particular coding technique in esql where in I can dynamically change the length of input xml field to 20 by padding it with space?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Aug 16, 2016 3:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can configure the DFDL model to do that for you.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Aug 16, 2016 3:34 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

You might like to look into the padding features of the DFDL Parser
Creating flixed length fields has been there for a long time. IF it wasn't then COBOL records would not work.

Then you don't have to do any work on the message in ESQL (or Java). The PArser will do it all for you.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Aug 16, 2016 8:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

I will put this much more strongly than my esteemed colleagues...

Do *not* try to solve this problem in ESQL. IIB is designed to handle data format for you. If you do try to code around it, you will just create a maintenance problem for whoever ends up looking after your 'solution'.
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 » ESQL Coding tips
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.