getting topic tag in uppercase
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
getting topic tag in uppercase
Hi Friends,
If i use this if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else ""
I am getting th topic tag as MFS/EXPENSEACCRUAL/ADJUSTMENT.
I have to process the XML message even when the content of the Topic tag is either upper case or lower case.
If i give the topic tag as MFS/EXPENSEACCRUAL/adjustment.I should get like MFS/EXPENSEACCRUAL/ADJUSTMENT.
Please suggest me to modify.
Thanks in advance.
sateesh.M
If i use this if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else ""
I am getting th topic tag as MFS/EXPENSEACCRUAL/ADJUSTMENT.
I have to process the XML message even when the content of the Topic tag is either upper case or lower case.
If i give the topic tag as MFS/EXPENSEACCRUAL/adjustment.I should get like MFS/EXPENSEACCRUAL/ADJUSTMENT.
Please suggest me to modify.
Thanks in advance.
sateesh.M
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
getting topic tag in uppercase
Hi Craig,
Thanks for your reply.I am posting it clearly now.
As of now we are inserting messages with the topic tag name as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.But even if the incoming xml with topic tag as<Topic>MFS/EXPENSEACCRUAL/adjustment</Topic> I should get it as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.So far i defined the stage variable derivation: if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else ""
It is working fine if the incoming xml message with topic tag name <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>. But I need to get if the topic is mixed with lowercase also i should get it in uppercase only.
Please through some light to solve this.
Thanks in advance.
Sateesh.M
Thanks for your reply.I am posting it clearly now.
As of now we are inserting messages with the topic tag name as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.But even if the incoming xml with topic tag as<Topic>MFS/EXPENSEACCRUAL/adjustment</Topic> I should get it as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.So far i defined the stage variable derivation: if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else ""
It is working fine if the incoming xml message with topic tag name <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>. But I need to get if the topic is mixed with lowercase also i should get it in uppercase only.
Please through some light to solve this.
Thanks in advance.
Sateesh.M
![Confused :?](./images/smilies/icon_confused.gif)
Why not just simplify things and get rid of all that extra stuff? No need to avoid nulls and you don't seem to need the EReplace. Try just:
Code: Select all
UpCase(Ln_Mfs_Exp_msg.MsgTopic)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
getting topic tag in uppercase
Hi Craig,
It doesn't work fine means.
When we are parsing xml message
INPUT:
" <?xml version="1.0" ?>
<MfsEnv>
<Mfsh>
<Psc>
<Command>Publish</Command>
<Topic>MFS/EXPENSEACCRUAL/adjustment</Topic>
<QName>CUST.EXPENSE.ADJ.REQ.Q</QName>
<QMgrName>WAS_MQ_server1</QMgrName>
i should get
OUTPUT:
" <?xml version="1.0" ?>
<MfsEnv>
<Mfsh>
<Psc>
<Command>Publish</Command>
<Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>
<QName>CUST.EXPENSE.ADJ.REQ.Q</QName>
<QMgrName>WAS_MQ_server1</QMgrName>
I tried with your code but still iam facing same thing when i am parsing the Input i am getting <Topic>MFS/EXPENSEACCRUAL/adjustment</Topic> only.
Thanks,
Sateesh.M
It doesn't work fine means.
When we are parsing xml message
INPUT:
" <?xml version="1.0" ?>
<MfsEnv>
<Mfsh>
<Psc>
<Command>Publish</Command>
<Topic>MFS/EXPENSEACCRUAL/adjustment</Topic>
<QName>CUST.EXPENSE.ADJ.REQ.Q</QName>
<QMgrName>WAS_MQ_server1</QMgrName>
i should get
OUTPUT:
" <?xml version="1.0" ?>
<MfsEnv>
<Mfsh>
<Psc>
<Command>Publish</Command>
<Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>
<QName>CUST.EXPENSE.ADJ.REQ.Q</QName>
<QMgrName>WAS_MQ_server1</QMgrName>
I tried with your code but still iam facing same thing when i am parsing the Input i am getting <Topic>MFS/EXPENSEACCRUAL/adjustment</Topic> only.
Thanks,
Sateesh.M
How exactly you are parsing it.
Try something like UpCase(Ln_Mfs_Exp_msg.MsgTopic) : "123"
and see whether you are getting 123 appended or not. I guess the particular derivation is not at all executed. Are you having any condition on the derivation.
Try something like UpCase(Ln_Mfs_Exp_msg.MsgTopic) : "123"
and see whether you are getting 123 appended or not. I guess the particular derivation is not at all executed. Are you having any condition on the derivation.
Success consists of getting up just one more time than you fall.
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
getting topic tag in uppercase
yes i am writnig a condition that if the message topic is null it should get rejected.
Sateesh.M
Sateesh.M
This continues to make absolutely no sense to me. Perhaps you should post a clear explanation of your job design, what comes in and what should go out - and what you mean by 'parsing' the XML.
Typically, you would read the file into the job using the Folder stage and it would be 'parsed' by an XML Input stage. The XPath expressions there 'flatten' the XML into records you would then write out to a sequential file or insert into a database. However, you seem to mean something else entirely when you say parse. Perhaps you mean reformat?
And converting a string to all upper case is a trivial transformation, so no clue why it isn't happening for you. As suggested, it sounds like its not being called or executed...
![Confused :?](./images/smilies/icon_confused.gif)
Typically, you would read the file into the job using the Folder stage and it would be 'parsed' by an XML Input stage. The XPath expressions there 'flatten' the XML into records you would then write out to a sequential file or insert into a database. However, you seem to mean something else entirely when you say parse. Perhaps you mean reformat?
And converting a string to all upper case is a trivial transformation, so no clue why it isn't happening for you. As suggested, it sounds like its not being called or executed...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
Hi Craig,
I am not able to put my topic properly infront of you.If i troubled u guys i am sorry.
1.As you said we are reading the file into job using Folder stage and then we are writing into Queue.
2.In the next job we are reading messages from Queue and loading it into Database(Staging Table).
3.Next job:From the staging table i am parsing the messages by using Xmlinput stage.Here based upon the topic tag it will parse the messages into target tables.
Here i am facing the problem.If my incoming xml message with topic Tag as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>
it is parsing it as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.
But eventhough my incoming message topic tag as like this <Topic>mfs/Expenseaccrual/adjustment</Topic>.I need to get as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.
In stage variable derivation i am giving as Svartopic as if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else "".
And in transformerstage of Target tables i am giving derivation for Topic as trim(Ln_Mfs_Exp_msg.MsgTopic).
I tried using with ur suggestions but i am getting The topic as mfs/Expenseaccrual/adjustment.
Any suggestions would be appreciated.
I am not able to put my topic properly infront of you.If i troubled u guys i am sorry.
1.As you said we are reading the file into job using Folder stage and then we are writing into Queue.
2.In the next job we are reading messages from Queue and loading it into Database(Staging Table).
3.Next job:From the staging table i am parsing the messages by using Xmlinput stage.Here based upon the topic tag it will parse the messages into target tables.
Here i am facing the problem.If my incoming xml message with topic Tag as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>
it is parsing it as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.
But eventhough my incoming message topic tag as like this <Topic>mfs/Expenseaccrual/adjustment</Topic>.I need to get as <Topic>MFS/EXPENSEACCRUAL/ADJUSTMENT</Topic>.
In stage variable derivation i am giving as Svartopic as if NOT(isNull(Ln_Mfs_Exp_msg.MsgTopic)) Then UpCase(Ereplace(Ln_Mfs_Exp_msg.MsgTopic,' ',"")) Else "".
And in transformerstage of Target tables i am giving derivation for Topic as trim(Ln_Mfs_Exp_msg.MsgTopic).
I tried using with ur suggestions but i am getting The topic as mfs/Expenseaccrual/adjustment.
Any suggestions would be appreciated.
Don't worry about it, this site is all about troubling people for help on problems.
It's just frustrating me that something that should be fairly simple is not getting solved. Obviously either I'm overlooking something or there is a critical piece of information that you don't know is critical and haven't passed along.
Oh, and all you people in the home audience - don't let me have all the fun, please - take yer shot. Put me out of my misery.
![Wink :wink:](./images/smilies/icon_wink.gif)
It's just frustrating me that something that should be fairly simple is not getting solved. Obviously either I'm overlooking something or there is a critical piece of information that you don't know is critical and haven't passed along.
![Confused :?](./images/smilies/icon_confused.gif)
Oh, and all you people in the home audience - don't let me have all the fun, please - take yer shot. Put me out of my misery.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: