Author |
Message
|
LearningMB |
Posted: Thu Jan 23, 2014 1:54 am Post subject: working with environment variables |
|
|
Newbie
Joined: 21 Jan 2014 Posts: 9
|
I want to get the database value to environment variable and assign to a local variable so that i could do some manipulations on it and store it back to the database. I am doing something like this
SET Environment.Variables.DBDATA[] = SELECT d.GMT FROM Database.dbo.GMT_EST as d;
SET DB_TS = Environment.Variables.DBDATA[1].Field1;
But DB_TS always contain null. Please help. I am totally new to MB with very less training.  |
|
Back to top |
|
 |
dogorsy |
Posted: Thu Jan 23, 2014 2:25 am Post subject: Re: working with environment variables |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
LearningMB wrote: |
I am totally new to MB with very less training.  |
Ask your manager / team leader to provide you some formal education. Alternatively you can read the infocentre. This IS NOT a training forum. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 23, 2014 2:29 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The output of a USERTRACE with it set to output ${Environment} would also help. _________________ 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 |
|
 |
LearningMB |
Posted: Thu Jan 23, 2014 3:01 am Post subject: Re: working with environment variables |
|
|
Newbie
Joined: 21 Jan 2014 Posts: 9
|
dogorsy wrote: |
LearningMB wrote: |
I am totally new to MB with very less training.  |
Ask your manager / team leader to provide you some formal education. Alternatively you can read the infocentre. This IS NOT a training forum. |
Please don't discourage if you can't help.
Used this and it worked. DBDATA[1]..GMT instead of DBDATA[1].Field 1
SET DB_TS = CAST(Environment.Variables.DBDATA[1].GMT AS CHARACTER); |
|
Back to top |
|
 |
dogorsy |
Posted: Thu Jan 23, 2014 3:07 am Post subject: Re: working with environment variables |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
LearningMB wrote: |
Please don't discourage if you can't help.
|
Quite the opposite. I am encouraging you to get formal training or use the infocentre. There are several samples provided with the product, you can follow the instructions supplied and go through them and learn. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 23, 2014 3:22 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Welcome to WMB/IIB. A couple of tips to help you with developing message flows:
- The debugger is great for finding many problems
- ...but sometimes you will need to use Trace nodes and user trace to diagnose a problem.
A Trace node shows you *exactly* what the message tree looks like at a particular point in your message flow.
A user trace is a detailed execution trace, and it is designed to help with problem diagnosis. Use the commands mqsichangetrace, mqsireadlog and mqsiformatlog ( in that order ) to take a user trace. You can search for 'mqsichangetrace' in this forum to find actual examples of those commands. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|