rejected_code isuue...

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

rejected_code isuue...

Post by admin »

Hi, all

I have a very simple job for making a staging table in Universe. I defined constraint for staging table, so that rows coming through dont match the constrain would be rejected. the rejected link constrain is "staing_insert.rejected".

This job works fine, two rows rejected, but no warning message issued. After checked my rejected file, I found the rejected rows REJECTEDCODE = 0. But rows were rejected.(They should be rejected as constrain required).

Does anybody have experience with this issue? Any advice would be appreciated.

Xiong
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

You only get a warning if you use the rejected=YES in the constraints table. You do not get it if the rejected link has its own constraint expression. You could follow up in code by testing the value of the links row count (use the DSGetLinkInfo() function) and handling the case where this is non-zero.

-----Original Message-----
From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
Sent: Monday, 29 October 2001 10:37
To: datastage-users@oliver.com
Subject: rejected_code isuue...


Hi, all

I have a very simple job for making a staging table in Universe. I defined constraint for staging table, so that rows coming through dont match the constrain would be rejected. the rejected link constrain is "staing_insert.rejected".

This job works fine, two rows rejected, but no warning message issued. After checked my rejected file, I found the rejected rows REJECTEDCODE = 0. But rows were rejected.(They should be rejected as constrain required).

Does anybody have experience with this issue? Any advice would be appreciated.

Xiong
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi, Ray

I did set Rejected Row = YES for reject link in the constraints table, as well set its constraint = staging_insert.REJECTED.

Since rows were rejected according to the constraints, why is the REJECTEDCODE = 0? In addition, because of the cause, no rejected information were recorded.

Xiong




> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 29 October 2001 12:50
> To: datastage-users@oliver.com
> Subject: RE: rejected_code isuue...
>
> You only get a warning if you use the rejected=YES in the constraints
> table. You do not get it if the rejected link has its own constraint
> expression. You could follow up in code by testing the value of the
> links row count (use the DSGetLinkInfo() function) and handling the
> case where this is non-zero.
>
> -----Original Message-----
> From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
> Sent: Monday, 29 October 2001 10:37
> To: datastage-users@oliver.com
> Subject: rejected_code isuue...
>
>
> Hi, all
>
> I have a very simple job for making a staging table in Universe. I
> defined constraint for staging table, so that rows coming through
> dont match the constrain would be rejected. the rejected link
> constrain is "staing_insert.rejected".
>
> This job works fine, two rows rejected, but no warning message issued.
> After checked my rejected file, I found the rejected rows
> REJECTEDCODE = 0. But rows were rejected.(They should be rejected as
> constrain required).
>
> Does anybody have experience with this issue? Any advice would be
> appreciated.
>
> Xiong
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

REJECTEDCODE is any error back from the database on the end of the link. Since you were able to write the rows into the sequential file, the error code back from the "database" (operating system) is 0. You want the REJECTED link variable, not REJECTEDCODE. Read the help on link variables, which explains the difference quite well. Also inspect the code generated by the Transformer stage, where you will see these variables being used.

-----Original Message-----
From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
Sent: Monday, 29 October 2001 11:19
To: datastage-users@oliver.com
Subject: RE: rejected_code isuue...


Hi, Ray

I did set Rejected Row = YES for reject link in the constraints table, as well set its constraint = staging_insert.REJECTED.

Since rows were rejected according to the constraints, why is the REJECTEDCODE = 0? In addition, because of the cause, no rejected information were recorded.

Xiong




> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 29 October 2001 12:50
> To: datastage-users@oliver.com
> Subject: RE: rejected_code isuue...
>
> You only get a warning if you use the rejected=YES in the constraints
> table. You do not get it if the rejected link has its own constraint
> expression. You could follow up in code by testing the value of the
> links row count (use the DSGetLinkInfo() function) and handling the
> case where this is non-zero.
>
> -----Original Message-----
> From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
> Sent: Monday, 29 October 2001 10:37
> To: datastage-users@oliver.com
> Subject: rejected_code isuue...
>
>
> Hi, all
>
> I have a very simple job for making a staging table in Universe. I
> defined constraint for staging table, so that rows coming through
> dont match the constrain would be rejected. the rejected link
> constrain is "staing_insert.rejected".
>
> This job works fine, two rows rejected, but no warning message issued.
> After checked my rejected file, I found the rejected rows
> REJECTEDCODE = 0. But rows were rejected.(They should be rejected as
> constrain required).
>
> Does anybody have experience with this issue? Any advice would be
> appreciated.
>
> Xiong
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

The rejected rows link does NOT have a constraint expression.

-----Original Message-----
From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
Sent: Monday, 29 October 2001 11:19
To: datastage-users@oliver.com
Subject: RE: rejected_code isuue...


Hi, Ray

I did set Rejected Row = YES for reject link in the constraints table, as well set its constraint = staging_insert.REJECTED.

Since rows were rejected according to the constraints, why is the REJECTEDCODE = 0? In addition, because of the cause, no rejected information were recorded.

Xiong




> -----Original Message-----
> From: Ray Wurlod [SMTP:ray.wurlod@Informix.Com]
> Sent: Monday, 29 October 2001 12:50
> To: datastage-users@oliver.com
> Subject: RE: rejected_code isuue...
>
> You only get a warning if you use the rejected=YES in the constraints
> table. You do not get it if the rejected link has its own constraint
> expression. You could follow up in code by testing the value of the
> links row count (use the DSGetLinkInfo() function) and handling the
> case where this is non-zero.
>
> -----Original Message-----
> From: Li, Xiong (Corporate Manukau) [mailto:Xiong.Li@chh.co.nz]
> Sent: Monday, 29 October 2001 10:37
> To: datastage-users@oliver.com
> Subject: rejected_code isuue...
>
>
> Hi, all
>
> I have a very simple job for making a staging table in Universe. I
> defined constraint for staging table, so that rows coming through
> dont match the constrain would be rejected. the rejected link
> constrain is "staing_insert.rejected".
>
> This job works fine, two rows rejected, but no warning message issued.
> After checked my rejected file, I found the rejected rows
> REJECTEDCODE = 0. But rows were rejected.(They should be rejected as
> constrain required).
>
> Does anybody have experience with this issue? Any advice would be
> appreciated.
>
> Xiong
>
Locked