Page 1 of 1

Routine (Transform Function) Warning on completion

Posted: Wed May 11, 2005 7:43 am
by palmeal
I'm not sure if this is a problem or not but I guess this thread will confirm if it is.
I have a job sequence with several server jobs activities tagged together - after one of the server jobs I have a Routine which I have defined as a Transform Function. The Routine opens a sequential file and creates a long comma separated string of data (contents of file pivoted). This string is returned via "Ans" and is used by the StartLoop Activity.

This works well but the question I have is to do with the logs in Director; the value being passed out via Ans is non-zero so I get a warning message written to the log.
(1) Is it safe to ignore this as the value being passed out is what I need ? The Job Sequence doesn't fail due to these warnings.
(2) Should I be using something other than a Transform Function to return a value out of a Routine ?

Re: Routine (Transform Function) Warning on completion

Posted: Wed May 11, 2005 8:15 am
by chulett
palmeal wrote:This works well but the question I have is to do with the logs in Director; the value being passed out via Ans is non-zero so I get a warning message written to the log.
This should mean that you have the 'automatically handle failures' option enabled and a non-zero return from a routine equates to failure to it. You can turn that option off, that or I believe that adding a link post routine to specifically handle 'failures' would turn off that feature as it only kicks in when you don't handle it yourself.

Posted: Wed May 11, 2005 8:53 am
by palmeal
Thanks for the repsonse Craig

I have 'automatically handle failures' turned off otherwise the job sequence does fail - I'll try adding a failure link on the trigger conditions on the Routine.

I've not got as far as thinking about monitoring the running of the job sequences in terms of Tivoli/Patrol but am worried that these warnings maybe picked up. To me what I am doing should not generate a warning (hence the point about am I using the correct Routine - Transform function) and I am worried that I won't be able to differentiate these warnings and other genuine warnings that I should be worrying about.

Ideally, I'd like to stop the warning message being written to the log.

Posted: Wed May 11, 2005 5:19 pm
by ray.wurlod
You could pass the result back through any of the @USER0 through @USER4 system variables, and return 0 through Ans.

Posted: Wed May 11, 2005 7:37 pm
by chulett
AHA! Good idea... I tend to forget about those little fellers. :wink:

Posted: Thu May 12, 2005 1:42 am
by Rubu
ray.wurlod wrote:You could pass the result back through any of the @USER0 through @USER4 system variables, and return 0 through Ans.
Hi Ray

Can You put some more light on these variable. It will be a great help for me.

Regards
Rubu

Posted: Thu May 12, 2005 3:01 am
by palmeal
I had a go at using @USER0 and couldn't see how it would work in one of the cases that I have.

The data being passed back currently via Ans is of the format

ABCD#01 Jan 1990#31 Jan 1990#,XYZA#01 Feb 1990#28 Feb 1990# and so on. The Ans (ReturnValue) is comma delimited and each record is made up of 3 components separated by a #.

When I pass this to the StartLoop Stage then I can select comma delimited for the Ans (ReturnValue) and use substrings + index to break up each record of 3 values.

If I assign Ans to @USER0 then it does assign the value of Ans as you said in your previous post but when I try to use it in the StartLoop then it seems to treat @USER0 as the string that is being passed into the Loop rather than ABCD#01 Jan 1990#31 Jan 1990#,XYZA#01 Feb 1990#28 Feb 1990#.

Hopefully I'm missing something simple here :-)

Posted: Thu May 12, 2005 5:05 pm
by ray.wurlod
I missed the fact that you are passing it back to a job sequence (a separate process). System variables don't work between processes; aren't accessible in downstream activities. But you could pass it back through the job's user status area (DSSetUserStatus) rather than through Ans.

To answer your original questions, it is safe to ignore these particular warnings, but preferable not to generated them at all. An a transform function is the only kind of Routine that can be invoked through a Routine Activity.