Page 1 of 1

XML inputfile

Posted: Mon Apr 09, 2007 2:05 pm
by shilpa79
Case:
I have to capture the file if its in this format with just the header information without the detail transaction information.
I have to send an email saying the file is bad thats the reason it didnot load anything into the table

Document DocVersion="1.0" File="Sales Transactions Export" ClientID="1000001" ClientName="1519" ExportId="0" Created="2/18/2007 4:26:16 PM" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<BU_List>
<BU BuId="1000062" Number="1519" Name="FRAN - 91912 6.2.9" />
</BU_List>
<Destination_List></Destination_List>
<Category_List></Category_List>
<Item_List></Item_List>
<MOP_List></MOP_List>
</Document>

Can anyone let me know how to solve this issue:

Posted: Mon Apr 09, 2007 2:44 pm
by ray.wurlod
Please elaborate on what you mean by "capture". Do you mean "pre-check" in some sense? That would suggest itself as the approach to take.
What is the characteristic that makes it bad - nothing in all five data fields? Or nothing in any one of them? I'd be thinking along the lines of scripting a command to check for contiguity of end tags with beginning tags via an Execute Command activity in the job sequence.

Posted: Mon Apr 09, 2007 4:26 pm
by shilpa79
[quote="ray.wurlod"]Please elaborate on what you mean by "capture". Do you mean "pre-check" in some sense? That would suggest itself as the approach to take.
What is the characteristic that makes it bad - nothing in a ...[/quot

The business wants to send an email if the file is getting data with just the header information.(thats for them bad file)
In this case wht is happening the job is not getting aborted and for sending an eamil notification.

I have 2 jobs one for header and another for detail coulmnds
when i run the first job it has to check if there is no deatil columns then check the condotion and send an email.

But in my case wht is happening is if its sucess or failure its sending an eamil notification becoz i have given unconditional trigger in the sequence

Thanks,

Posted: Mon Apr 09, 2007 5:26 pm
by chulett
If you already have a job that parses out the 'detail' records, why not check it after job to see if it found any records to process? Check your 'write' link for a rowcount and, if zero, send the email.

You just need a generic "get a link's rowcount" routine (will come in handy in more than just this situation) and run it in your Sequence job. Trigger the email if a zero comes back.

Posted: Mon Apr 09, 2007 6:45 pm
by shilpa79
chulett wrote:If you already have a job that parses out the 'detail' records, why not check it after job to see if it found any records to process? Check your 'write' link for a rowcount and, if zero, send the email.

You just need a generic "get a link's rowcount" routine (will come in handy in more than just this situation) and run it in your Sequence job. Trigger the email if a zero comes back.


I have routine to get the row count.

But my question in first job i have to check or in the second job.
I want to sen dan email in the first job If not it will insert data in the first job and nothing will load in the detail job'
If theyu reprocess the same file with detail information and same header than it will maintain duplicates with the same file.

Thanks,

Posted: Mon Apr 09, 2007 11:18 pm
by ray.wurlod
So whats the difficulty? The first job is run from a job sequence that makes the decision about whether to run the second job or to send email.