Page 1 of 1

sequence issue

Posted: Tue Jan 08, 2008 7:42 pm
by just4u_sharath
Hi. I have a small issue.

In my sequence there are 5 job activities. In the third job i will produce a sequential file. If the flat file contains any records, whole sequence should be terminated. For this i have used a terminator stage attached to job activity 3 and for its trigger i have given 'custom condition: mdsCountLines(file path). when i compile the job, i get the below error.

"Array 'mdsCountLines' never dimensioned.

1 Errors detected, No Object Code Produced.
(ODS0SequencerMember)"

I cannot even compile. what does the error mean. How can i resolve this.

Posted: Tue Jan 08, 2008 7:50 pm
by ray.wurlod
Your routine is either not compiled or its name is misspelled. Or you are calling it from some other routine which lacks a DEFFUN compiler declaration to inform the calling routine that the name followed by a left parenthesis is that of a function rather than that of a dimensioned array.

sequence issue

Posted: Tue Jan 08, 2008 8:18 pm
by just4u_sharath
I was calling this routine in JOBACTIVITY--->TRIGGER---->Expression. No indication of syntax error.

Posted: Tue Jan 08, 2008 8:38 pm
by ray.wurlod
You can't. Only the moderator can. You could start a new thread there.

The syntax error is indicated in the error text and explained in my first response. The compiler process a token of the form "name(" in a certain way. It is assumed to be a reference to a dimensioned array unless a DEFFUN declaration informs the compiler otherwise.

Posted: Tue Jan 08, 2008 8:40 pm
by chulett
First off, as Ray asked, is "mdsCountLines" a custom routine? Is it properly compiled and something you've used before?

Secondly, I really don't think you can call routines like that directly in your trigger expression. I would suggest you use a Routine Activity stage to execute the routine and then check the $ReturnValue in the trigger instead.

Posted: Tue Jan 08, 2008 11:53 pm
by ray.wurlod
Put another way, there is no documented mechanism that allows you to establish DEFFUN declarations for trigger expressions.

sequence issue

Posted: Wed Jan 09, 2008 12:34 am
by just4u_sharath
ray.wurlod wrote:Put another way, there is no documented mechanism that allows you to establish DEFFUN declarations for trigger expressions.
Sorry guys, I am really brand new to this field.Can you please let me know "what is meant by DEFFUN". The problem is solved by using an execute commandactivity. But really i dont know what is DEFFUN and compiler, ---far from my brains

Re: sequence issue

Posted: Wed Jan 09, 2008 12:46 am
by just4u_sharath
just4u_sharath wrote:
ray.wurlod wrote:Put another way, there is no documented mechanism that allows you to establish DEFFUN declarations for trigger expressions.
Sorry guys, I am really brand new to this field.Can you please let me know "what is meant by DEFFUN". The problem is solved by using an execute commandactivity. But really i dont know what is DEFFUN and compiler, ---far from my brains
""It is assumed to be a reference to a dimensioned array unless a DEFFUN declaration informs the compiler otherwise."". How can i inform compiler. what kind of declaration should i give, and where that declaration should be given.

Posted: Wed Jan 09, 2008 1:39 am
by ray.wurlod
Look in the DataStage BASIC manual or on-line help from Designer for information about the DEFFUN statement.

We have already stated that you can not introduce a DEFFUN statement into a trigger expression; you must invoke it from your own code (for example a particular routine invoked from a Routine activity).

Can you please explain exactly what you've implemented, together with the exact expression(s) used? If it's relatively short the code from the routine that you're trying to call might be useful also.