FTP file stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

FTP file stage

Post by laxmi_etl »

Hi,

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


Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Set the environment variables up as job parameters and use job parameter references in the FTP stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Re: FTP file stage

Post 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...
Assume everything I say or do is positive
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Re: FTP file stage

Post 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.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Re: FTP file stage

Post 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.
Assume everything I say or do is positive
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Re: FTP file stage

Post 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.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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#
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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?.
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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.
kris18
Charter Member
Charter Member
Posts: 46
Joined: Mon Nov 13, 2006 9:53 am
Location: United States

Post 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.
kris
laxmi_etl
Charter Member
Charter Member
Posts: 117
Joined: Thu Sep 28, 2006 9:10 am

Post 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?.
Post Reply