ODBC - SQL write errors

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kwt10
Participant
Posts: 17
Joined: Tue Nov 25, 2003 9:33 am

ODBC - SQL write errors

Post by kwt10 »

I was just wondering if there was a way to trap ODBC write errors to SQL files. I am combining multiple files into one that have the same key information. I seem to be getting some files that have duplicate keys so they do not write. Is there anyway that I can trap out the records that are not being written?

Thanks
raju_chvr
Premium Member
Premium Member
Posts: 165
Joined: Sat Sep 27, 2003 9:19 am
Location: USA

Re: ODBC - SQL write errors

Post by raju_chvr »

Oh yeah . the reject link. but do u want to write the rejected data into SQL files or Sequential files. I was confused ? :oops:
kwt10
Participant
Posts: 17
Joined: Tue Nov 25, 2003 9:33 am

Post by kwt10 »

I would love to write them out to a seq. file. That would allow me to look at the data and see any issues.

I am new at the DS thing. Can you explain how I would use the reject link for this?

Thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Look in the online manual for the transformer stage. You can setup a sequential file as a second output from a transformer, where the first output is an ODBC/OCI stage. Checking the reject box in the transformer constraint dialog automatically refers DB rejected rows down that link.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kwt10
Participant
Posts: 17
Joined: Tue Nov 25, 2003 9:33 am

Post by kwt10 »

I did this and ran it but none of my rows were moved to the reject file. I know that I have 1000 records (not real number) in the input file, once the stage is finished it says 1000 records were written, but when I look at the SQL file created it only has 995 rows in it. We have looked at the input files and the do not have any duplicate keys so we just don't get it.

Thanks
kwt10
Participant
Posts: 17
Joined: Tue Nov 25, 2003 9:33 am

Post by kwt10 »

Found the problem!! We had data entry people who entered data in lower case AND upper case in the keyed fields. Our system was fixed a couple years back to upper case all stuff and these records were entered before that. So we ended up with keys in lower case and upper case that matched. I changed my DS job to not update records and to kick out the errors to a file.
Post Reply