Page 1 of 1

Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 10:28 am
by bensonian
I am trying to pass a 'Timestamp' value from a unix file after removing new line charecter, using a EXECUTE COMMAND' activity and the 'Char(Command Output)' value, which is a timestamp, is being passed to the next job, which has it's parameter type being defined as String.

The job is aborting due to the following reason:

(@Job_Activity_13): Controller problem: Error calling DSSetParam(pEXTR_STRT_TS), code=-4
[ParamValue/Limitvalue is not appropriate]

Could anybody shed some light on it.

Thanks

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 10:32 am
by sud
Give this a try, use this derivation in the sequence when passing the parameter to the job:

Code: Select all

Ereplace(Link.$CommandOutput,@FM,'')

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 10:47 am
by bensonian
sud wrote:Give this a try, use this derivation in the sequence when passing the parameter to the job:

Code: Select all

Ereplace(Link.$CommandOutput,@FM,'')

Still its the same error

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 10:50 am
by sud
Ok, please provide the following:

1> The contents of the file
2> The commands (exact) used in the execute command stage and while passing to the job

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 11:02 am
by bensonian
sud wrote:Ok, please provide the following:

1> The contents of the file
2> The commands (exact) used in the execute command stage and while passing to the job

Contents of file:

"2008-07-24 00:00:01"

command:

cat -n <path name> <filename>

passing to the job: Ereplace(Execute_Command_0.$CommandOutput,@FM,' ')

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 11:08 am
by sud
Do only a cat (the -n option will list with record numbers which you don't want). Use this:

Code: Select all

cat <path name>/<filename>


and in ereplace, make sure there is no space between the single quotes.

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 11:27 am
by bensonian
sud wrote:Do only a cat (the -n option will list with record numbers which you don't want). Use this:

Code: Select all

cat <path name>/<filename>


and in ereplace, make sure there is no space between the single quotes.
Appreciate your help sud. Its still the same thing, even after i changed it accordingly.

Controller problem: Error calling DSSetParam(pEXTR_STRT_TS), code=-4
[ParamValue/Limitvalue is not appropriate]

Posted: Fri Jul 25, 2008 11:44 am
by keshav0307
are you sure the output from the execute command is "2008-07-24 00:00:01" only and your execute command is not failing.
what is return value of the execute command??
the output from execute command will be a char, and can be passed to a string variable as trim(Execute_Command_0.$CommandOutput)

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 11:45 am
by sud
Hmmm, I am running out of ideas, but let us do one thing.

a> In the sequence where you pass the parameter value to the job, just hardcode the timestamp value and run, if this works then surely the problem is on the sequence side and do point b. If this failed do c.

b> Check what is being sent to the job, there can be many ways of doing it, you can call the basic routine writetolog (something like that)

c> Then the problem is with the job parameter in the job, may be delete it and redefine it or something ... recompile the job (any such illogical thing you can think of ... sometimes jobs do get corrupted).

Re: Passing Timestamp as a parameter value

Posted: Fri Jul 25, 2008 1:46 pm
by bensonian
sud wrote: c> Then the problem is with the job parameter in the job, may be delete it and redefine it or something ... recompile the job (any such illogical thing you can think of ... sometimes jobs do get corrupted).
Option C worked sud. Appreciate your help sud.