Page 1 of 1

Sequential File Structure......

Posted: Wed Nov 07, 2007 11:43 pm
by pavans
Hi,
I have file in unix whcih has the following structure:

TableName|Src|FileId|Processed|Inserts|Updates|Rejects|Datafiles Processed|TimeStamp |
AMZN_SHIP_TRAK_W | 71| 8| 148221| 148221| 0| 0|10/18/07-10/18/07 | Fri Oct 19 07:44:50 2007
1 of 7 tables loaded
Following tables NOT loaded:
AMZN_PMTN_W - File was not received or was received as an empty file.
AMZN_CUST_RETN_W - File was not received or was received as an empty file.
AMZN_STAX_W - File was not received or was received as an empty file.
AMZN_REPL_SHIP_W - File was not received or was received as an empty file.
AMZN_CUST_SHIP_W - File was not received or was received as an empty file.
AMZN_PMTN_W - File was not received or was received as an empty file.

Can a sequential file take data in this format.
How to extract this type of file in datastage.

thanks

Posted: Wed Nov 07, 2007 11:53 pm
by chulett
Sure, read it as one long varchar column then parse as appropriate. The question is what data do you need to 'extract' from it?

Posted: Thu Nov 08, 2007 12:05 am
by pavans
chulett wrote:Sure, read it as one long varchar column then parse as appropriate. The question is what data do you need to 'extract' from it? ...
I want to extract the file as it is and load into a sequential file.

Posted: Thu Nov 08, 2007 12:11 am
by chulett
:? Now you've lost me, what would be the point of that? It's already 'in a sequential file'. However... read / write it as one long varchar column.

Posted: Thu Nov 08, 2007 12:14 am
by pavans
chulett wrote::? Now you've lost me, what would be the point of that? It's already 'in a sequential file'. However... read / write it as one long varchar column. ...
Thanks.
Now you can see a column called 'Rejects'.
If the rejects are >0, i have to send a mail.
how can i do this in datastage.

Posted: Thu Nov 08, 2007 12:18 am
by pavans
chulett wrote::? Now you've lost me, what would be the point of that? It's already 'in a sequential file'. However... read / write it as one long varchar column. ...
Thanks.
Now you can see a column called 'Rejects'.
If the rejects are >0, i have to send a mail.
how can i do this in datastage.

Posted: Thu Nov 08, 2007 6:59 am
by chulett
Read the file as pipe delimited, write only if Rejects > 0. In a Sequence job, check for rows down your output link and trigger a Notification Activity when that count is > 0 as well. Build a generic custom routine to do the check, you can use DSGetLinkInfo() with DSJ.LINKROWCOUNT (off the top of my head) to do that in your routine.