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
Variable file length when used in Datastage fails
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 13
- Joined: Fri Oct 08, 2004 6:19 am
Re: Variable file length when used in Datastage fails
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
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.
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.
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
"You can never have too many knives" -- Logan Nine Fingers