Posted: Tue Aug 16, 2016 3:13 am Post subject: ESQL Coding tips
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?
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.
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'.
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