Page 1 of 2

FTP file stage

Posted: Fri Nov 10, 2006 12:44 pm
by laxmi_etl
Hi,

Can anyone help me in using environment variables for FTP Plugin file stage. It is not accepting global variables.


Thanks

Posted: Fri Nov 10, 2006 1:11 pm
by ray.wurlod
Set the environment variables up as job parameters and use job parameter references in the FTP stage.

Re: FTP file stage

Posted: Fri Nov 10, 2006 1:22 pm
by csrazdan
To use environment variables for FTP Plugin file stage you will have to add parameter to the job. I'm assuming you are calling user defined project parameter as global variables. You can source project paramter as $PROJDEF by defining the value in DataStage administrator or by $ENV to source it from parent shell in UNIX.

Hope it helps...

Re: FTP file stage

Posted: Fri Nov 10, 2006 1:44 pm
by laxmi_etl
csrazdan wrote:To use environment variables for FTP Plugin file stage you will have to add parameter to the job. I'm assuming you are calling user defined project parameter as global variables. You can source project paramter as $PROJDEF by defining the value in DataStage administrator or by $ENV to source it from parent shell in UNIX.

Hope it helps...

When I defined the server name,username, password as variables in the job properties it working fine. When I define the same variables in administrator and try to call it in the job after importing it in job parameters it is giving below fatal errors.

seqRTV_OVR,0: Failure during execution of operator logic.

seqRTV_OVR,0: Fatal Error: Fatal: Connection to the remote host's FTP server failed, host name not found

I have same issue with RDBMS stage when using the environmental variables.
Do we need to set something in the adminstrator?.

Any help would be great.

Re: FTP file stage

Posted: Fri Nov 10, 2006 2:03 pm
by csrazdan
I'm aware encrypted passwords defined as Project Parameters do not work properly when added to a job. If you are using password as encrypted you should create a job parameter for it. Otherthan that all all Project Parameter work fine. Try using $PROJDEF as a default value for the project parameters in the job.

Re: FTP file stage

Posted: Fri Nov 10, 2006 2:12 pm
by laxmi_etl
csrazdan wrote:I'm aware encrypted passwords defined as Project Parameters do not work properly when added to a job. If you are using password as encrypted you should create a job parameter for it. Otherthan that all all Project Parameter work fine. Try using $PROJDEF as a default value for the project parameters in the job.
I have hardcoded the user and passwd properties in FTP stage. I ran the job using environment variable just for server name . I used $PROJDEF too but still job is getting aborted with same error
seqRTV_OVR,0: Fatal Error: Fatal: Connection to the remote host's FTP server failed, host name not found

I don't understand why?. This is working fine for Oracle ,ODBC, sequential file stages.

Posted: Fri Nov 10, 2006 2:21 pm
by narasimha
Another check would be

Say if your parameter name is $SERVERNAME, how are you referencing that in your RDBMS stage
if you are using #SERVERNAME# change it to #$SERVERNAME#

Posted: Fri Nov 10, 2006 2:34 pm
by laxmi_etl
narasimha wrote:Another check would be

Say if your parameter name is $SERVERNAME, how are you referencing that in your RDBMS stage
if you are using #SERVERNAME# change it to #$SERVERNAME#
I am doing the same thing.
I defined rdwserver as userdefined variable in admin and imported it into job parameter as $rdwserver with $PROJDEF in default value and finally in the FTP plugin file stage I called it as #$rdwserver#. It throws the same error. No luck.

Posted: Fri Nov 10, 2006 2:49 pm
by narasimha
Try hardcoding the name of your server name in the FTP stage and see if the connection fails again.
Also double check the default you have specified in the Administrator is your server name

Posted: Fri Nov 10, 2006 3:03 pm
by laxmi_etl
narasimha wrote:Try hardcoding the name of your server name in the FTP stage and see if the connection fails again.
Also double check the default you have specified in the Administrator is your server name
Hardcoding the servername is working. But I am not able to use Environment variable.

Posted: Fri Nov 10, 2006 3:07 pm
by laxmi_etl
narasimha wrote:Try hardcoding the name of your server name in the FTP stage and see if the connection fails again.
Also double check the default you have specified in the Administrator is your server name
The default I specified in the Administrator for server name is correct. There is nothing wrong in that.

Posted: Fri Nov 10, 2006 3:13 pm
by laxmi_etl
narasimha wrote:Try hardcoding the name of your server name in the FTP stage and see if the connection fails again.
Also double check the default you have specified in the Administrator is your server name

I have hardcoded the servername and tried to use the parameter for username. I have defined the username in admin as rdwuser but when I use it in the job as #$rdwuser# and run it job is getting aborted saying
seqRTV_OVR,0: Fatal Error: Fatal: Login to the FTP server failed, invalid password for user #DSCAPIOP__rdwuser#

What is #DSCAPIOP__ ?
I defined user as #$rdwuser#. I don't know why it is throwing the error as #DSCAPIOP__rdwuser# for username. Any idea?.

Posted: Mon Nov 13, 2006 11:21 am
by laxmi_etl
laxmi_etl wrote:
narasimha wrote:Try hardcoding the name of your server name in the FTP stage and see if the connection fails again.
Also double check the default you have specified in the Administrator is your server name

Any Suggestions.

Posted: Mon Nov 13, 2006 11:45 am
by kris18
i think you are making something wrong in specifying the parameters in the admin...try this by doing one by one... i mean to say try to hardcode evrything in the ftp stage run it and c for errors, if you don't find any errors then go by parametrizing username first and leaving the rest hardcoded.... and run the job again c for error... and so on.

Posted: Mon Nov 13, 2006 2:02 pm
by laxmi_etl
kris18 wrote:i think you are making something wrong in specifying the parameters in the admin...try this by doing one by one... i mean to say try to hardcode evrything in the ftp stage run it and c for errors, if you don't find any errors then go by parametrizing username first and leaving the rest hardcoded.... and run the job again c for error... and so on.


I have tried everything what you have said but still FTP stage is not able to pick up environmental variable values at runtime. Hardcoding the values is working and If I define the local variable just within the job( Job level not the Project level) it is working.
This is happening only for FTP and RDBMS stages.
Do we need to change any setting or something?.