Routine Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Routine Error

Post by karry450 »

Hi Friends,

My routine A is trying get the paramaterfile and read the contents

ERROR
Full parameter filename = /
(fatal error from A): Error opening parameters file, '/', status = 2


ROUTINE

#include DSINCLUDE JOBCONTROL.H


Ans = 0

Equate RoutineName To "A"

FullParamFileName = Trim(paramfile)
Call DSLogInfo("Full parameter filename = " : FullParamFileName,RoutineName)

ParamErr = 0

*
* Try to open the file...
*
OpenSeq FullParamFileName To ProjectParamFileVar
Else
Msg = 'Error opening parameters file, ' : SQuote(FullParamFileName) : ', status = ' : Status()
Call DSLogFatal(Msg, RoutineName)
Abort
End


-------------------------------------------

And I gave paramfile value expression as './file' while is there in current directory.

can anyone help me if this routine is right.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What do you think the "current directory" is when the routine is called? Best to stick with full pathnames to avoid issues like this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

chulett wrote:What do you think the "current directory" is when the routine is called? Best to stick with full pathnames to avoid issues like this. ...
I have even tried passing the fullpath it doesnt work

any inputs will help me a lot

thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And you've verified that path that you log is correct and that it not only exists but you have the proper permissions on it as well? Does this work when you 'Test' it and only fail in the job or does it not work at all yet?
-craig

"You can never have too many knives" -- Logan Nine Fingers
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

chulett wrote:And you've verified that path that you log is correct and that it not only exists but you have the proper permissions on it as well? Does this work when you 'Test' it and only fail in the job or does ...
When Iam actually testing the routine If I dont supplying any quotes for the values and it is working fine.

But when I call the routine in a job activity it is not accepting if I dont supply quotes to the values. And then If I supply quotes and run I getting the error that I have posted earlier.

Can anyone help me please.

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

karry450 wrote:But when I call the routine in a job activity it is not accepting if I dont supply quotes to the values.
Two problems here. One is you don't call a routine from a Job Activity stage - do you mean a Routine Activity stage? And what does "not accepting" mean, what exactly are you putting in as the parameter value and what happens?
-craig

"You can never have too many knives" -- Logan Nine Fingers
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

chulett wrote:
karry450 wrote:But when I call the routine in a job activity it is not accepting if I dont supply quotes to the values.
Two problems here. One is you don't call a routine from a Job Activity stage - do you mean a Routine Activity stage? And what does "not accepting" mean, what exactly are you putting in as the parameter value and what happens?
Sorry it is routine activity stage, When i mnt not accepting , it is showing in RED colour and Im unable to compile the job.

Im putting as file and this shows red in colour and the job does nt get compiled, and when I put as './file' it is accepting and gives the error I have mentioned earlier
Last edited by karry450 on Tue Jul 28, 2009 11:00 pm, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Again, what exactly are you putting in the stage that it won't accept?
-craig

"You can never have too many knives" -- Logan Nine Fingers
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

chulett wrote:Again, what exactly are you putting in the stage that it won't accept? ...
Im putting paramfile value expression as file it shows in red and the job doesnt compile
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Routine Error

Post by ray.wurlod »

ERROR
Full parameter filename = /
(fatal error from A): Error opening parameters file, '/', status = 2
You can't use OpenSeq to open / because / is a directory not a file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course, but they're not trying to open "/".
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

karry450 wrote:
chulett wrote:Again, what exactly are you putting in the stage that it won't accept? ...
Im putting paramfile value expression as file it shows in red and the job doesnt compile
Argh! Don't just repeat what you've already said, that doesn't help at all. I want to know the value you are putting there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply