Reject Link from a Sequential file

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
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Reject Link from a Sequential file

Post by srinagesh »

Hi !

I have a flat file with the following records

Code: Select all

"Empno","Ename","Salary","Deptno","JoiningDate"
1,"a",5000,100,2006-01-01
2,"b",,100,2006-01-01
3,"c",,,
The Column definition of the sequential file stage is

Code: Select all

Empno  number(4) not null
Ename  varchar(50) not null
Salary   decimal (12,5) not null
deptno   number(4) not null
Joining Date  Date  not null
I have designed a datastage parallel job to read from this flat file and populate the Oracle database table (one-to-one mapping).

I have a reject link from the flat file to handle reject records.

I expected the records 2&3 to be rejected in the reject link. But this is not the case.


Do you have any pointers for this?

Regards
Nagesh
Simplicity is the ultimate sophistication
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Did you specify a "default value" in the attributes for the column "Salary"?
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Post by srinagesh »

Yes, I have tried giving a default value and have tried removing the default value. I couldnot find any difference.

It wasnot going into the reject link
Simplicity is the ultimate sophistication
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you give it a default value or handler or nulls then the row won't be rejected. Do rows 2 and 3 go down the "normal" link?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

In the properties tab of sequential file stage, what have you set the "Reject Mode" to?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Post by srinagesh »

I have set the reject property as "output". It will output the reject records into the reject link.
Simplicity is the ultimate sophistication
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I just recreated a sample job similar to your situation and its working fine provided you are not giving a default value. Can you confirm that the value is infact not space and just empty.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
srinagesh
Participant
Posts: 125
Joined: Mon Jul 25, 2005 7:03 am

Post by srinagesh »

Hi DSGuru,

Can you send me the dsx file so that I can have a look at the same please.


Regards
Nagesh
Simplicity is the ultimate sophistication
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I am not sure If I can do that but I can certainly explain you all the properties i set.
FOr column meta data I created a file with your sample data and imported it. Fixed the length and precision.
Under Properties, for options I had
First Line is Column Names = True
Keep File Partitions = False
Missing File Mode = Depends
Reject Mode = Output
Report progress = Yes

Under Formats tab I had
Final Delimiter = end
Delimiter = comma
Quote = double

Rest all are defaults.
When hit view data, if you dont see records 2 and 3, then they will be rejected.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are the fields nullable? If so, how have you set the Null Field Value property? The empty fields may be being read as NULL. What data are being imported into the job?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sajarman
Participant
Posts: 41
Joined: Mon Nov 28, 2005 6:29 am

Post by sajarman »

Have you specified APT_STRING_PADCHAR to any value? Are you getting the records 2 & 3 in the normal link? then what are the values for the columns?
How about the NULL_VALUE in format tab, have you set it to some value?
Post Reply