Hi
How do we validate the flat file whether the files are having headers, Trailers and Details. If any one is not there, job should get aborted.
Could anyone advise how do we implement this?
validate file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why not script this if all this is is a validation step? If the validation fails, don't run the processing job. Between a count of the total records in the file and a check to see how many records start with "H" and "T", you should be able to whip something up.
Use a Sequence job to run the validation and take the appropriate steps afterwards based on the results.
Use a Sequence job to run the validation and take the appropriate steps afterwards based on the results.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If file has one header and one trailer this is a trivial task to script. If the file might have multiple headers and trailers, the best solution is probably a DataStage job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.