sequence issue

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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

sequence issue

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

sequence issue

Post by just4u_sharath »

I was calling this routine in JOBACTIVITY--->TRIGGER---->Expression. No indication of syntax error.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

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

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

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put another way, there is no documented mechanism that allows you to establish DEFFUN declarations for trigger expressions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

sequence issue

Post 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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

Re: sequence issue

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

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