File from Unix....

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

File from Unix....

Post by pavans »

Hi,
I have a file in Unix which is in this format.
I want to use this as a source in my Datastage job.
The problem is the file is located in Unix Env, where the path is differnet from our working directory path.

there are 5 differnt files, with this structure.
how can i use these in datastage and whcih stage i have to use.
In the design i have to send a mail if Rejects are > 0 only.

TableName|Src|FileId|Processed|Inserts|Updates|Rejects|Datafiles Processed|TimeStamp |
AMZN_CUST_W | 72| 1| 88605| 88605| 0| 0|10/04/07-10/04/07 | Thu Oct 4 13:33:03 2007
AMZN_FRD_DATA_W | 72| 2| 434361| 431948| 2410| 3|10/04/07-10/04/07 | Thu Oct 4 14:27:13 2007
AMZN_CUST_ORD_W | 72| 4| 220595| 219668| 927| 0|10/04/07-10/04/07 | Thu Oct 4 14:30:39 2007
TableName |Src|FileId|Processed|Inserts|Updates|Rejects|Datafiles Processed|TimeStamp |
REMV_STAT_W | 72| 10| 20| 0| 20| 0|10/04/07-10/04/07 | Thu Oct 4 14:30:49 2007
AMZN_CUST_SETL_W | 72| 11| 40682| 40682| 0| 0|10/04/07-10/04/07 | Thu Oct 4 14:31:24 2007
5 of 9 tables loaded
Following tables NOT loaded:
AMZN_FRD_ORD_CAN_W - File was not received or was received as an empty file.
AMZN_ORD_REINST_W - File was not received or was received as an empty file.
AMZN_ORD_SRC_W - File was not received or was received as an empty file.
AMZN_REF_TAG_SRC_W - File was not received or was received as an empty file.


Please help me.

Thanks in advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: File from Unix....

Post by chulett »

pavans wrote:I want to use this as a source in my Datastage job. The problem is the file is located in Unix Env, where the path is differnet from our working directory path.
:? That's not a problem, actually it's perfectly normal. Just specify the full path to the directory they are in (hopefully as a job parameter) in the Sequential File stage.
pavans also wrote:there are 5 differnt files, with this structure. how can i use these in datastage and whcih stage i have to use.
See above. Either a wildcard pattern to read them all at once or a looping job structure so that you can process (and notify) one at a time. If you are on a 7.5.x release, then you have the Loop and UserVariables stages in Sequence jobs which make that pretty straight-forward.
-craig

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