How to stop job execution if a parameter is null

One Star

How to stop job execution if a parameter is null

Hello,
In my job I've a parameter to define the file name and pass it's value using the command line. But I need to check if the value passed isn't null and if it's null the job must stop it's execution.
How could I do that? I try to use tAssert but it didn't work.
Regards,
Felipe Cypriano
One Star

Re: How to stop job execution if a parameter is null

Can't you use
rightclick -> events -> execute if
and write your if statement?
One Star

Re: How to stop job execution if a parameter is null

Thanks hammerwd,
I was using onSubjobOk with the tAssert, now I changed it to Run If and write the if condition - again - in the if.
One Star

Re: How to stop job execution if a parameter is null

Now only one problem still there. How could I set an else statement? Because I need to return an error code when the if is false, the caller must know that the operation failed.
One Star

Re: How to stop job execution if a parameter is null

Hmm .. I didn't do it before, but maybe you can use two if
first the valid:
if value != 0 and than do some jobs
and a second if:
if value == 0 than send mail or something like this.