Saturday, September 1, 2007

DB2 V8 Error Saga continues...

Our DB2 system was converted from NFM (New function mode) to ENFM (Enhanced New Function Mode) & immediately to CM (Compatibility mode) last week...And like in all other conversions we had problems in this conversion too...This time it was with a load job which abended with a file length mismatch error...

We were unloading a DB2 System parameter CURRENT SQLID in our unload card and this caused our job to bomb in production because the length of the variable in which the SQLID is stored was increased and with the DB2 upgrade the variable definition got upgraded to VARCHAR instead of CHAR(8) before...

This caused the IBM unload utility DSNTIAUL to increase the record length of the Unload file...Thus our load step got abended because junk data was getting uploaded into the table...As per the recommendation by DB2 Technical Services we altered the PARMS Parameter in the run card from PARMS('SQL') to PARMS('SQL,1)

DSN PROGRAM(DSNTIAUL) PLAN(DSNTEP2) PARMS('SQL',1) ---> From PARMS('SQL') to PARMS('SQL,1)...

But it didnt work..our job failed once again in production..Then we did a thorough analysis and found that the CURRENT SQLID in the unload card was the problem...We then modified the query to limit the CURRENT SQLID selection by using the typecast function CHAR(8) thus limiting the data to 8 characters...Our job ran fine with this change..

Ooohhhh! Hopefully this is the last error that we are getting out of this DB2 V8 upgrade as all the three stages have been rolled out and we are in the final mode of V8 Compatibility mode (CM)...

- Suresh Gangadharan

3 comments:

Rui said...

Hello, Suresh Gangadharan

I just want to say that your post helped us very much in a similarly problem: We had a DSNTIAUL job with SELECT and CASE...WHEN...ELSE...END and the unloaded SYSREC file had more 2 bytes before the data field, which meant to be the evaluation field length. To avoid these 'extra' bytes, we used the cast function CHAR enclosing the CASE expression.... and it ran fine! Thank you for sharing your experience!
Rui

Suresh Gangadharan said...

Hai Rui...nice to hear that the post helped u in fixing some problem at ur work which is the sole idea why i started this blog!!

Unknown said...

I think you would need a new blog for UPC expansion issues.