Variable file length when used in Datastage fails

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
srini_ramesh
Participant
Posts: 13
Joined: Fri Oct 08, 2004 6:19 am

Variable file length when used in Datastage fails

Post by srini_ramesh »

We are validating flat files using a Datastage job. We validate only till a length of 121 , but at some instances we receive files with higher lengths. The entire file is read into a single column in Sequential file and we select fixed width for the sequential file.

In such cases the job currently fails, when we receive a file with a higher length. Is there a method to over come this?

Currently we are setting the Length of the "Column" to 500 in the property of the Sequential file. Is there a better way to handle this issue?

Thanks
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Re: Variable file length when used in Datastage fails

Post by ogmios »

You can possibly play around with the settings of the Sequential Stage. In the tab where you see the input columns, scroll to to complete right (columns you don't normally see on your screen), there you will find some options to play with. I'm pretty sure you can make it work without failing but you will get warnings.

And fixed width is for fixed width files, so you're kinda abusing the tool.

Ogmios
In theory there's no difference between theory and practice. In practice there is.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you don't care about the data in the file that exceeds your current record length, there is a check-box in the stage to 'Ignore row truncation'. That should stop it from aborting.

Other than the columns that Ogmios mentions, you could also try setting your record length large and bringing it in as a Varchar. Don't declare it to be fixed width, set the delimiter charater to something you know will never be in the data and it should all happily come in as one long string. Then you can check the length and parse it down after that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply