Author |
Message
|
mb_zest |
Posted: Tue Mar 19, 2013 11:47 pm Post subject: Need help in Changing FileOutput node Properties Dynamically |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Hi,
I need help with changing FileOutput node properties dynamically (Like FTP Server Name & FTP Server Directory), I gone through the following link
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fbc23790_.htm
There is a statement for the Remote server name
Code: |
LocalEnvironment.Destination.File.Remote.Server |
But from the above code I could not figure that out whether they are reffering to InputLocalenvi or outputLocalenv, I tryed with OutputLocal environment to override the property but the value of the server is not taken from the localenvironment but its taking from the Node property.
Or else please suggest me the alternative way. Please
Thanks,
Zest.
Last edited by mb_zest on Wed Mar 20, 2013 12:54 am; edited 4 times in total |
|
Back to top |
|
 |
Esa |
Posted: Tue Mar 19, 2013 11:56 pm Post subject: Re: Dynamically Changing FTP Properties |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Should you use InputLocalEnvironment or OutputLocalEnvironment depends on the Compute Mode you have selected for you Compute node. If you have selected "LocalEnvironment and Message" a new tree "OutputLocalEnvironment" is created for you and will be propagated with the message. You are responsible for it's contents.
If you selected "Message" the existing LocalEnvironment will be reused and propagated. So you should put your fields in InputLocalEnvironment. |
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 12:46 am Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Hi Esa,
Thanks for the reply, I am yousing "LocalEnvironment and Message" but its not takiing from the outputlocal environment it takes from the node property itself.
Thanks,
Zest |
|
Back to top |
|
 |
Esa |
Posted: Wed Mar 20, 2013 12:59 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
Put a trace node in front of the FileOutput node and check what's in LocalEnvironment. |
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 1:27 am Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Code: |
( ['MQROOT' : 0x12abaf30]
(0x01000000:Name):File = (
(0x01000000:Name):Read = (
(0x03000000:NameValue):Directory = 'E:\Report\output' (CHARACTER)
(0x03000000:NameValue):Name = 'StockReport63.PDF' (CHARACTER)
(0x03000000:NameValue):LastModified = GMTTIMESTAMP '2013-01-23 16:31:44.735' (GMTTIMESTAMP)
(0x03000000:NameValue):TimeStamp = '20130320_092319_523222' (CHARACTER)
(0x03000000:NameValue):Offset = 0 (INTEGER)
(0x03000000:NameValue):EndOfFile = TRUE (BOOLEAN)
(0x03000000:NameValue):RecordNumber = 1 (INTEGER)
(0x03000000:NameValue):Delimiter = NULL
(0x03000000:NameValue):IsEmpty = FALSE (BOOLEAN)
(0x03000000:NameValue):NoMatchReason = NULL
)
)
(0x01000000:Name):Destination = (
(0x01000000:Name):File = (
(0x03000000:NameValue):Directory = 'E:\Report\output' (CHARACTER)
(0x03000000:NameValue):Name = 'StockReport63.PDF' (CHARACTER)
(0x01000000:Name ):Remote = (
(0x03000000:NameValue):Server = '187.65.23.54:21' (CHARACTER)
)
)
(0x01000000:Name):RouterList = (
(0x01000000:Name):DestinationData = (
(0x03000000:NameValue):labelName = 'TO_FTP' (CHARACTER)
)
)
)
(0x01000000:Name):Wildcard = (
(0x03000000:NameValue):WildcardMatch = '' (CHARACTER)
)
)
|
This was the log I got from localenvironment tree.. here the remote server name is set perfectly.. what may be the cause.. please suggest me a work around for this please.
Thanks,
zest |
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 1:46 am Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Think my question is confusing all.. the direct question is.. How can I overwrite the "Remote server and port" & "Server directory" properties of "FTP" tab of FileOutput node. Please suggest the possible ways.
Thanks,
Zest |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Wed Mar 20, 2013 2:17 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
What is version of your runtime? |
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 2:27 am Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Hi marko.pitkanen,
I am using V7.0.0.4.
Thanks,
Zest |
|
Back to top |
|
 |
McueMart |
Posted: Wed Mar 20, 2013 2:35 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 3:11 am Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Hi McueMart,
Thanks for your help.. but I am not able to get any clue how to override the Remote server and port & Server directory. can any one please tell me if this is possible to do dynamically or not.
Thanks,
zest. |
|
Back to top |
|
 |
McueMart |
Posted: Wed Mar 20, 2013 3:29 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Did you read my link? It clearly explains you need 7.0.0.5 (It was a new feature in that fixpack)! |
|
Back to top |
|
 |
aravind703 |
Posted: Wed Mar 20, 2013 6:12 am Post subject: @ mb_zest |
|
|
Apprentice
Joined: 24 Sep 2011 Posts: 29
|
@ mb_zest
Try some thing like this
Quote: |
SET InputLocalEnvironment.Destination.File.Remote.Server = 'Address' ;
SET InputLocalEnvironment.Destination.File.Remote.ServerDirectory ='\Library\library\Shared\TEST\FILE';
|
Now copy your Input Local Environment to the Output Local Environment
Quote: |
SET OutputLocalEnvironment = InputLocalEnvironment; |
this worked for me. Hope this resolves your issue
mb_zest wrote: |
Hi McueMart,
Thanks for your help.. but I am not able to get any clue how to override the Remote server and port & Server directory. can any one please tell me if this is possible to do dynamically or not.
Thanks,
zest. |
|
|
Back to top |
|
 |
mb_zest |
Posted: Wed Mar 20, 2013 9:02 pm Post subject: |
|
|
Novice
Joined: 06 Feb 2013 Posts: 16
|
Hey Thanks alot McueMart that solved the problem .. I was in a rush didnt saw that clearly.. totally my bad |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 21, 2013 3:33 am Post subject: Re: @ mb_zest |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
aravind703 wrote: |
@ mb_zest
Try some thing like this
Quote: |
SET InputLocalEnvironment.Destination.File.Remote.Server = 'Address' ;
SET InputLocalEnvironment.Destination.File.Remote.ServerDirectory ='\Library\library\Shared\TEST\FILE';
|
Now copy your Input Local Environment to the Output Local Environment
Quote: |
SET OutputLocalEnvironment = InputLocalEnvironment; |
|
Why take one step to solve a problem, when you can solve the same problem in ten steps?
Just Set OutputLocalEnvironment directly.
 |
|
Back to top |
|
 |
Esa |
Posted: Thu Mar 21, 2013 5:26 am Post subject: Re: @ mb_zest |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
mqjeff wrote: |
aravind703 wrote: |
@ mb_zest
Try some thing like this
Quote: |
SET InputLocalEnvironment.Destination.File.Remote.Server = 'Address' ;
SET InputLocalEnvironment.Destination.File.Remote.ServerDirectory ='\Library\library\Shared\TEST\FILE';
|
Now copy your Input Local Environment to the Output Local Environment
Quote: |
SET OutputLocalEnvironment = InputLocalEnvironment; |
|
Why take one step to solve a problem, when you can solve the same problem in ten steps?
Just Set OutputLocalEnvironment directly.
 |
Or more precisely:
Why take two steps when you can solve the problem with three.
The code is obviously from an esql library module that is supposed to work regardles of compute mode  |
|
Back to top |
|
 |
|