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 » General IBM MQ Support » How do you trim tabs with the TRIM function?

Post new topic  Reply to topic
 How do you trim tabs with the TRIM function? « View previous topic :: View next topic » 
Author Message
cayenne
PostPosted: Tue Mar 06, 2007 2:39 pm    Post subject: How do you trim tabs with the TRIM function? Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 8

Hello!

I'm trying to learn the TRIM function functionality, and I've come upon something I can't find out there in the literature.

I see that for character data, the default trim_singleton is a space. I'm wondering how you can change this to a tab?

I'm experimenting with a recursive procedure to reconstruct the incoming xml message...and I need to get rid of the whitespace...the ' ' space singleton wasn't it, so thinking it might be tabs.

I'm trying something like:
IF TRIM('/t' FROM FIELDNAME(v_root)) <> '' THEN

But, I don't know if /t is the tab character in MQ.

Any suggestions here for trimming tabs or any other invisible characters?

Thanks in advance,

cayenne
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 06, 2007 2:44 pm    Post subject: Reply with quote

Grand High Poobah

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

Read the broker manual on how it handles a tab.
If you look for the java version of the tab it should be \t

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
cayenne
PostPosted: Wed Mar 07, 2007 6:18 am    Post subject: I've tried... Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 8

fjb_saper wrote:
Read the broker manual on how it handles a tab.
If you look for the java version of the tab it should be \t

Enjoy

I've tried looking through all the documentation that I have available so far...and I can't find info on the tab....otherwise I'd not have posted the question.

This is ESQL....not java.

Any answers greatly appreciated.

C
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 07, 2007 7:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, ESQL won't evaluate a symbolic constant like \t or /t.

You can either determine the hex value of a horizontal tab in the CCSID of the message, or you can explicitly type a horizontal tab inside single-quotes.
Code:
declare myTABChar character '    ';


Since this is an ESQL question, though, you should have posted it in the WMB forum.

A moderator may decide to move this thread, don't otherwise do anything yourself.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
cayenne
PostPosted: Wed Mar 07, 2007 7:43 am    Post subject: Thank you! Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 8

jefflowrey wrote:
Okay, ESQL won't evaluate a symbolic constant like \t or /t.

You can either determine the hex value of a horizontal tab in the CCSID of the message, or you can explicitly type a horizontal tab inside single-quotes.
Code:
declare myTABChar character '    ';


Since this is an ESQL question, though, you should have posted it in the WMB forum.

A moderator may decide to move this thread, don't otherwise do anything yourself.


Thank you...I'll give it a try. As you can probably tell..I'm VERY noob to MQ, and this forum...wasn't sure exactly where to post...so I put it in general.

I'll try your suggestion, as well as look into things like CCSID...that's a new term for me.

Again, thank you!!

C
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 07, 2007 8:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

CCSID is "CodedCharSetID" or "Coded Character Set ID" - it's the number that tells various things which text format to interpret the bytes as - ASCII, EBCDIC, Unicode, Windows text, Unix text, etc.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
cayenne
PostPosted: Wed Mar 07, 2007 8:21 am    Post subject: Thank you. Reply with quote

Newbie

Joined: 07 Dec 2006
Posts: 8

jefflowrey wrote:
CCSID is "CodedCharSetID" or "Coded Character Set ID" - it's the number that tells various things which text format to interpret the bytes as - ASCII, EBCDIC, Unicode, Windows text, Unix text, etc.


Thank you...I'm trying to look all this up. I've jumped into all this...no training, no previous experience with MQ...and trying to wade my way through it.

I'm looking closer at what I tried that was posted previously...and it appears it may not be tabs after all, but, CR/LF's.

I'm basically here, trying to work with examples I've seen with a recursive procedure that takes the original incoming message, and reconstruct it as a string, but, some of them coming in are being put together with lots of whitespace ..I'm guessing a combo of tabs, spaces and CR/LF.

Thank you for the suggestions and new terms for me to look up. One quesiton with respect to the CCISD and other things I'm finding such at CWF and TDS...are there places in the Toolkit to set all these or is it code related?

I'm sorry if these sound like stupid questions...but, I've not encountered this level of stuff in MQ till now in my very short time of working with it...
Just trying to find info and get a grasp on how this all works.

I'm wanting to do something that should be pretty simple, but, looks like I'm gonna have to get more indepth...

Thanks again for all the help so far...I've got a good bit to start researching for now...

C
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 07, 2007 8:27 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No training?

Ouch.

You're in for a long and bumpy ride. WMB is not an easy product to learn on your own - hopefully you have some experienced people working with you to help.

CWF and TDS are the names of different parsers under the MRM. TDS stands for "Tagged, Delimited Strings" and CWF stands for "Custom Wire Format". MRM stands for... "MRM".

MRM supports three styles of parsing, CWF, TDS and XML. MRM allows you to create, in the Toolkit, a model of the data in your message. This allows WMB to use that model (when properly deployed to a broker Execution Group) to construct a logical message tree from the physical bitstream of the message data.

Then you can use ESQL or etc. in WMB to manipulate - copy or transform - the logical message tree. Then the same or a different model or parser can be used to produce an output physical bitstream from the logical message tree.

Get TRAINING! Or at least read a lot of redbooks and the Information Center very very carefully and many times. And then work through the examples and the Samples.
_________________
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 » General IBM MQ Support » How do you trim tabs with the TRIM function?
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.