Notification Activity

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
pandu80
Participant
Posts: 50
Joined: Fri Apr 08, 2005 5:56 pm

Notification Activity

Post by pandu80 »

Hi,
I am calling 3 sequence jobs in a main sequence job. In this, i have created a sequential from the 2 sequence jobs.
let me explain a bit more,
I need to create a sequential file in the first seuence,If i got any errors in the file.(Here iam doing only some fatal error checks)
I need to create a sequential file in the second seuence,If i got any errors in the file.(Here iam doing some general validations like IsNull(),NUM() etc..)
In both places iam using same filename and metadata for the sequential file.In the first sequence job,I have selected the 'overwrite the existing file' and in the
second sequence job,I have selected the 'append to existing file'.Here i have written a routine to find the no'of rows in the sequential file and if it returns
any value iam sending a notification else load the target database.

Actually my sequence job works fine for the following cases.
1.If i get the errors only in the first sequence
2.If i get the errors only in the second sequence

If i get the errors in the both sequence's it is not working.I have checked the routine return value also and it returns
correct value only.and its not triggering the Notification activity link.

anybody explain me the reason.

TIA
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Pandu80,

the "overwrite" and the "append" switches work for sequential files, so my first assumption would be that in your sequence you are not ensuring that Job 2 starts after Job 1 finishes; i.e. they are running at the same time. This would give a concurrency issue where your file contents are those of whatever job "closed" the sequential file first.

You can check your sequence coding, or make the 2nd job write to a different file for test purposes and/or watch the monitor at runtime to make sure the 2 jobs are not running concurrently.
pandu80
Participant
Posts: 50
Joined: Fri Apr 08, 2005 5:56 pm

Post by pandu80 »

I have checked it.Iam sure that they are not running concurrently and i can see the routine return value correctly after end of second job.

TIA
ArndW wrote:Pandu80,

the "overwrite" and the "append" switches work for sequential files, so my first assumption would be that in your sequence you are not ensuring that Job 2 starts after Job 1 finishes; i.e. they are running at the same time. This would give a concurrency issue where your file contents are those of whatever job "closed" the sequential file first.

You can check your sequence coding, or make the 2nd job write to a different file for test purposes and/or watch the monitor at runtime to make sure the 2 jobs are not running concurrently.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you change the name of the 2nd output file and run your test with both writing, does that work as expected? I should also have been more explicit in my first response, on the first call from the sequence, in the "triggers" tag do you have the output marked as "conditional"?
pandu80
Participant
Posts: 50
Joined: Fri Apr 08, 2005 5:56 pm

Post by pandu80 »

yes i did.
But i have to create a single sequential file with all the errors and have to attach it to the mail.

TIA.
ArndW wrote:If you change the name of the 2nd output file and run your test with both writing, does that work as expected? I should also have been more explicit in my first response, on the first call from the sequence, in the "triggers" tag do you have the output marked as "conditional"?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Pandu,

(a) When you test it with 2 different files and both jobs have errors you get the data subsets written correctly to both files?

(b) You checked in your master sequence that all calls are sequential and not concurrent (I still am sure that this is where you are getting your problem)?

(c) You are certain that the 2nd job has append for the sequential file attribute?

(d) If you run your second job alone does it actually append to the file?
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

Post by ranga1970 »

Pandu;

one more thing;

you said, its not working when both sequencers giving errors, whats the trigger critearia, from second to third

Code: Select all

seq1 ....seq2..seq3

Code: Select all

or  seq1......seq3
     .
     .
     seq2..... seq3 



whats your design,

if its on errors in seq1 execute seq2 else seq3 and in seq3 you should execute 3 three on no errors, if threre are errors in seq2 it should notify you that there are errors an seq2 also, here se1 failed seq2 fialed ..

do you still want to execute seq3???? th[/code]
RRCHINTALA
pandu80
Participant
Posts: 50
Joined: Fri Apr 08, 2005 5:56 pm

Post by pandu80 »

Code: Select all

seq1--------->seq2..........>Routine activity---------->error
                                   |
                                   ------------>load
seq1 to seq2 unconditionally it should execute whether there is errors in seq1 or not.If Returnvalue is '=1' then 'load' if 'otherwise' trigger 'error'


TIA[/code]
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Post your Routine code. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply