Routine (Transform Function) Warning on completion

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
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Routine (Transform Function) Warning on completion

Post 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 ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Routine (Transform Function) Warning on completion

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could pass the result back through any of the @USER0 through @USER4 system variables, and return 0 through Ans.
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 »

AHA! Good idea... I tend to forget about those little fellers. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rubu
Premium Member
Premium Member
Posts: 82
Joined: Sun Feb 27, 2005 9:09 pm
Location: Bangalore

Post 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
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post 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 :-)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply