Sequential File Structure......

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Sequential File Structure......

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Post 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.
pavans
Participant
Posts: 116
Joined: Sun Sep 10, 2006 7:33 am
Location: bangalore, india

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

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