Datatypes and Length of Reject Codes (DBMSCODE,SQLSTATE,etc)

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
zbethem
Charter Member
Charter Member
Posts: 19
Joined: Tue Mar 14, 2006 2:12 pm
Contact:

Datatypes and Length of Reject Codes (DBMSCODE,SQLSTATE,etc)

Post by zbethem »

In defining the datatype and lengths of the reject columns, I'm at a loss as to what to define the values to.

I'm capturing the following in my reject link:
DBMSCODE
LASTERR
REJECT
REJECTCODE
SQLSTATE

Does it matter what I define these to? All my searches have come up empty as to what the datatypes of these codes are. Figured I'd ask the crowd.

Thanks in advance.
diamondabhi
Premium Member
Premium Member
Posts: 108
Joined: Sat Feb 05, 2005 6:52 pm
Location: US

Post by diamondabhi »

I use varchar with length 100.
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you're trapping to a sequential file, the datatypes are really irrelevant except for a few quirks. Choose a delimited file and just set the metadata to VARCHAR. Set the length and display to something you like because it affects the VIEW DATA display. If you choose fixed-width, you get into issues with the column size (really the display size) matters. Make it simple and just use a delimited file.
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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

VarChar is always safe. SQLSTATE is never more than 20 characters long, DBMSCODE never more than 10, and the REJECTED variables are true/false (1 or 0). However, depending on the database, LASTERR can be very long indeed; for any Microsoft data source I allow VarChar(4000) or even more, since they generate very verbose error/warning messages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply